Hello. Is there any other way for not using the submit button? <?php $user_choice = $_POST['font_styles']; if ($user_choice == "font_style_1"){ $font = 'firstfont'; }elseif ($user_choice == "font_style_2"){ $font = 'secondfont'; }elseif ($user_choice == "font_style_3"){ $font = 'thiredfont'; }elseif ($user_choice == "font_style_4"){ $font = 'forthfont'; } ?> <html> <head> <style> h1 { font-family = $font; } </style> </head> <body> <form method='post'> <select name="font_styles"> <option value="font_style_1">font_style_1</option> <option value="font_style_2">font_style_2</option> <option value="font_style_3">font_style_3</option> <option value="font_style_4">font_style_4</option> </select> <input type="submit"> </form> <h1>username</h1> </body> </html> I want when a user opens the drop-down menu and chooses an option, the font of the <h1> tag changes and the user …

Member Avatar
Member Avatar
+0 forum 7

Hello. When i open a file in my linux localhost with the command "gedit file.php" and then put a part of code in it, then i can't save the file. the save icon above the gedit is deactivated. What can i do?

Member Avatar
Member Avatar
+0 forum 4

Hi I have decided to update my PC to Windows 7 64 bit. My existing PC has a lot of programs and data that needs to be preserved. I have read that with Vista Business an inplace install can be made but wonder if that is correct. If not I'll need to move programs or reinstall them. I have two hard drives so I am thiniking about copying all the files on the C drive to another drive - drive F. or just copying My Documents and the program files to drive F. If I copy all the files I …

Member Avatar
Member Avatar
+0 forum 3

Hi Guys I have a program thats supposed to generate 9 random objects made from lines and then allow me to save the panel showing the state of all 9 objects. Currently all 9 objects are being generated and when i click save the panel is being saved to a png file. However it seems that the png file and the panel are in two different states. Ive attached pictures at the end. code for my current GUI where the save button is located: `import javax.swing.*; import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; import java.util.Random; import java.awt.image.BufferedImage; …

Member Avatar
Member Avatar
+0 forum 7

For a small class it doesn’t matter that much, but for a bigger class I find it handy to have an oversight of all the methods at hand. That’s what I did here. One requirement is that the class file has already been compiled error free. Don’t know if my algo to detect a “method” line is bullet proof, but it works in most if not all cases tested. Tips on how this could be improved are always welcome. Further highlights: How to: Show text in a listbox. How to: Save text in a file How to: Open and read …

Member Avatar
Member Avatar
+0 forum 5

Hi Guys, Im a bit puzzled on the best way to store data which will later be saved to a csv. I am doing a record search on a database table which will get cycle through each employee and get the relevent information. Once I have done this I will then create a string builder which will go through all this information and append the csv. The problem is im struggling to find the best way to store this information in the meantime. Ive tried something funky with a list dictionary but it didnt come off right. Any ideas anyone? …

Member Avatar
Member Avatar
+0 forum 5

Hi boys and Girls, Quick question I cannot seem to find the answer to: Why use CodeDOM to generate a class over say saving the structure of your code as text to a notepad and renaiming it to .cs? or just save it as a .cs file outright? Why go through all the effort of using CodeDOM if it will be easier to read programmatically i.e. string = "using bar;" SaveToFile(file, string); string = "namespace bla" AppendToFile(file,string) string = "{" AppendToFile(file,string) etc. anyone care to venture? Kind Regards Marco p.s. Excuse the pseudo code.

Member Avatar
Member Avatar
+0 forum 3

i have an rsvp page where the table is populated by guests according to event selected in the drop down list. the rsvp table has 2 columns: guest names and status. status(radio button) is divided into 3: unconfirmed(default status), attending and not attending. user has to choose either one. but i am having trouble saving the status. tia for any help! php getting the list of names: <?php $t = $_GET['t']; require "connection.php"; $check = $dbh->prepare("SELECT guest_id,guest_name,status FROM guest WHERE event_id = :t "); $check->bindParam(':t', $t); $check->execute(); if ($check->rowCount() > 0) { $check->setFetchMode(PDO::FETCH_ASSOC); $Guests = 0; $Unconfirmed = 0; $Attending …

Member Avatar
Member Avatar
+0 forum 2

hi guys. so i have this page that i have setup so the data gets submitted without refresh although the message saying data has been added is displayed, no data is submitted into database. I need a pair(or more) of fresh eyes. please and thank you. form: <form id='addspouse'> <fieldset class="updatespouse"> <label style="font-size:20px;font-weight:bold">Edit Spouse</label><br><br> <input type="hidden" value='$id' id='contactid'> <input type="hidden" value='$session' id='session'> <fieldset style='padding:3px;width:600px;margin-left:20px'> <label> <b>NOTE : </b>Fields with asterisk <label style='color:red'>*</label> &nbsp;are required fields unless information for that field &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;is unavailable then enter hyphen <label style='color:red'>-</label>&nbsp;&nbsp;. No fields should be left blank. </label> </fieldset><br> <div style='width:100px;height:0px'><label><label style="color:red">*</label>Salutation</label></div> <div …

Member Avatar
Member Avatar
+0 forum 2

Hello i need to save score on application close and when will start up to show the last score is entered... i have not idea how do i start i have searched on google but nothing found which can help me, please show me some ways/codes of doing it. Thanks ! :)

Member Avatar
Member Avatar
+0 forum 5

hey so im trying to save data but i get error: `You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE event_id = '8'' at line 1` this being the line: `$sql = mysql_query("INSERT INTO event(guest_num) VALUES('$total') WHERE event_id = '".$event_id."' ") or die(mysql_error());` php: if(isset($_POST['save']) && isset($_POST['check']) ) { foreach($_POST['check'] as $insert_id) { require "connection.php"; $total = mysql_real_escape_string($_POST['ttlg']); $event_id = mysql_real_escape_string($_POST['event']); $sql = mysql_query("INSERT INTO event(guest_num) VALUES('$total') WHERE event_id = '".$event_id."' ") or die(mysql_error()); $name1 = mysql_real_escape_string($_POST['gname']); $insert_id = (int)$insert_id; $guest = mysql_query("INSERT …

Member Avatar
Member Avatar
+0 forum 2

Hello all, I am by no means a coder, so hopefully someone has something they would be willing to share that would meet this need. I would like to have a Outlook rule, where: - When an email comes in from a specific account - Has an attachment (PDF, doc, docx, tff only) - Saves the attachment to a folder (say on desktop) I would like this done to maybe 3-5 different email accounts, and bonus points if it could then delete the email completely after. I would be using outlook 2010. Any one have something that would work?

Member Avatar
+0 forum 0

Well, in my previous thread i needed help deleting arrays, for the codes i use its here: http://www.daniweb.com/software-development/vbnet/threads/426588/how-to-move-arrays-1-place-down- But now i need help saving the arrays, i can save all the arrays to ini file like this: Ini module: Option Strict On Module INIAccess #Region "API Calls" ' standard API declarations for INI access ' changing only "As Long" to "As Int32" (As Integer would work also) Private Declare Unicode Function WritePrivateProfileString Lib "kernel32" _ Alias "WritePrivateProfileStringW" (ByVal lpApplicationName As String, _ ByVal lpKeyName As String, ByVal lpString As String, _ ByVal lpFileName As String) As Int32 Private Declare Unicode …

Member Avatar
Member Avatar
+0 forum 25

how we can use get setting and save setting in vb 6.0 with example.or any reallife program. thanks

Member Avatar
Member Avatar
+0 forum 1

Hello guys, I have a project to save an image from canvas to file. I have tried googling for 3 days and nothing works. Can anybody show me how to do it. I have search from this forum and this is what i get. http://www.daniweb.com/software-development/java/threads/436548/saving-canvas-as-image " Create a new buffered image. Get its Graphics. Draw your canvas on the Graphics. (Use your existing paintComponent method and pass the BufferedImage's Graphics to it.) " well i dont realy understand how to code it. Please give me an example how it should be done. Thanks.

Member Avatar
Member Avatar
+0 forum 4

Hi everyone, I am quite new to vb.net. Recently, I've been learning about Oledb commands and it's ability to save records in a form to a database. So, I started a project and now I am stuck. Here's the scenario: The form comprises of several comboboxes, a listview box and a command button. The combobox will get values from an access database. The users will be able to select from the comboboxes and on command button click, the entries will be added to the list view in a single row. All the above steps work perfecty except the part where …

Member Avatar
Member Avatar
+0 forum 1

Dear All Master, please help me for my first program that i want to create...i have problem for save from datagridview to access database...everytime i try to save , only first line have save...another not save...sory for my bad english language...thank's here my code.... Sub simpen() Dim i As Integer Dim cmd As New OleDbCommand cmd.Connection = con For i = 0 To DataGridView1.Rows.Count - 1 strsql = "insert into students_grade (student_no, student_name, grade) values (@student_no, @student_name, @grade)" cmd.CommandText = strsql With cmd.Parameters cmd.Parameters.AddWithValue("@student_no", DataGridView1.Rows(i).Cells(0).Value) cmd.Parameters.AddWithValue("@student_name", DataGridView1.Rows(i).Cells(1).Value) cmd.Parameters.AddWithValue("@grade", DataGridView1.Rows(i).Cells(2).Value) End With acsdr = cmd.ExecuteReader acsdr.Close() Next i MessageBox.Show("Data Inserted") End …

Member Avatar
Member Avatar
+0 forum 1

windows 7 home premimum x64 access denied for saving files to app_data folder and any other folder in the projects root directory. Code below is what im using to save and getting... doc.Save(Server.MapPath("~/App_Data/Logs")) I get a couple access to path denied msgboxes. Set a few permissions and no go.

Member Avatar
Member Avatar
+0 forum 2

Oh boy They ust be tired of me now. My trouble: I have two ArrayLists of custom classes. ``ArrayList<Subject>` **a**` ``ArrayList<Student>` **b**` Within those custom classes are other custom classes which themselves have primitive data types as well as an ArrayList of other custom classes. It's a big circus going on. How do I XMLEncode those two ArrayLists, **a** and **b**, so that all the information within them branching all the way down, is saved? (Also, is it possible to save both of these to the same file please?)

Member Avatar
Member Avatar
+0 forum 4

i am using employee table to test if i am doing the whole program correct. I have 5 buttons. one is to add records and another to save(commit), to update, to delete and to clear. I am having trouble with the code to save the record to the data set. when i click add, it lets me add the new name but when i press save(commit), it wont save. i already added the data adapeter. this is my code: Public Class Form1 Dim inc As Integer Dim MaxRows As Integer Dim con As New OleDb.OleDbConnection Dim dbProvider As String Dim …

Member Avatar
Member Avatar
+0 forum 2

Does anyone know of any code that records actions that mouse and keyboard performs on my computer then save the file so I can replay it later I have 340,000 pdf documents to work through The Idea is to ... The recording app will do three things, when I start it up it must load what was recorded under A that is to open the first PDF in a directory copy a line of text thats in the same place every time - paste into the recording app, I plan to make text box that when end edit is fired …

Member Avatar
+0 forum 0

I am using the richtextbox, and now when I am saving the File, then the File get saved but not as I want.? Example: File Name: example File extension: .txt Body: **1.)**Hey guys, Whats up? **2.)**R u Fine ??? **3.)**Reply soon Now When I save the file and open in the notepad. then its seem as: **1.)**Hey guys, Whats up?R u Fine ???Reply soon while if I open the same file with Wordpad then no problem it looks as it should... So how can I edit this things. Using Richtextbox only, reason: change specific text fonts/colour/save as rtf,txt,doc etc... If …

Member Avatar
Member Avatar
+0 forum 2

So im not too sure if im posting this in the right forum. please dont be angry! new at daniweb so basically what i wanna know is how to save real time date into database. what i have is a page with tabs of month and in each tab the content consists of a form and in the form theres a table and save button and also coding to display real time(year) tab (month feb) <div class="tabContent" id="feb"> <center><h2>February <span id="year"><script type="text/javascript">document.write(new Date().getFullYear())</script></span></h2></center> <---real time(year) <div> <form method="post" action="income.php"> <div style="height:0px;"> <div class="rmtotal"> <?php if(@$febresult) ?> <h3>Your Total Income :</br> …

Member Avatar
Member Avatar
+0 forum 3

Yesterday (October 25) I spent a few hours working on a Word document. When printed out, it is six pages long. This morning (October 26) when I opened up the document to resume work on it, all my latest work was gone. The document property indicates it was last modified October 21. In fact, it looks like the work I did on October 22 is not there either. I am anal about saving, usually hitting the Control-S key or `Save` button frequently as I work on something. So I am wondering what the heck happened? Has anybody else encountered behaviour …

Member Avatar
Member Avatar
+0 forum 3

Hello everyone I am facing a problem that I have never encountered before and googling around just isn't helping. I was assigned to migrate a pmWiki server to a new MediaWiki server which was supposed to run as a virtual machine on a Red Hat Cluster Suite. My coworker and I had to copy paste almost 2000+ articles. During the migration my coworker decided to make a backup script with which he effectively deleted the libc library and many other important data. We copied the image of the Hard Drive in order to extract the database of our wiki but …

Member Avatar
Member Avatar
+0 forum 2

how can i save a .txt file in C:\? I keep on getting a permission box preventing me from doing so.

Member Avatar
Member Avatar
+0 forum 1

my problem is i want to save a date from label in vb to field in ms access but i do not know that problem with my coding, the error appear is run-time error 91 object variable or with block variable not set, can anyone check my coding? Dim Con As New ADODB.Connection Dim Rs As New ADODB.Recordset Private Sub cmdfind_Click() Dim search As String search = txtfind.Text Call OpenConnection With Rs .ActiveConnection = Con .CursorType = adOpenDynamic .CursorLocation = adUseClient .LockType = adLockOptimistic .Open "SELECT * FROM STUDENTS where [reg] like" & "'" & search & "'", Con, adOpenStatic, …

Member Avatar
Member Avatar
+0 forum 4

Hi, I want to write a VBA macro in Word that open an Excel file, save that Excel file to another file (to another name), and then clear all content of the original Excel file. How to do that? Thanks!

Member Avatar
Member Avatar
+0 forum 3

Good day everyone - Since this is my first post, I must say hi. I just started learning Python 8 hours ago and I like to challenge myself, so following a guide on playing with files, I decided to make a program that would open a .txt and it would create a backup and save to that backup in real time. **Problems - 1) CTRL+S won't do the trick, it'a mess - It could work very well if ran as daemon and only on that specifical window 2) - I wish for the script to stop running when notepad.exe, actually …

Member Avatar
+0 forum 0

in my db have 20+ columns. i added 19 columns throught input form and stored in db succesfully. i fetch few details from db in my main page. in my main page 1 more column is there. that is status column, it is a combo box. if i click status column it should show 4 values. i want to select that values and click save button it must go to stored in db with that same ID. how to do that? mainpage combo box coding: echo "\t<td width=148><form action=statusdb.php method=post> <select name=update><option value=empty></option><option value=Confirm>Confirm</option><option value=Processing>Processing</option><option value=Pending>Pending</option><option value=Cancelled>Cancelled</option></select> <input name=\"update[".$a_row['slno']."]\"; type=submit …

Member Avatar
Member Avatar
+0 forum 1

The End.