Save User Inputs while javascript reloading!


Posted on 16th Feb 2014 07:03 pm by admin

hi..
i have written a PHP code in which i reload the page when user selects a value in dropdown...Code: function reload(form)
{
var val=form.cat.options[form.cat.options.selectedIndex].value;
Did you know?Explore Trending and Topic pages for more stories like this.
self.location='form.php?cat=' + val;
}

the problem with this script is that it can retain only the numbers which is the value of the selected item in the drop-down.I also want to retain the name field which is an input string. How can i do it?
No comments posted yet

Your Answer:

Login to answer
327 Like 28 Dislike
Previous forums Next forums
Other forums

unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_
Can anyone view my code and tell me why im getting the error:
Parse error: syntax error, unexpect

Open/Close Links in Php
Hello, Hoping someone can inform me how I can get PHP to automatically open a set of links in a new

need Array help
This is what I have to do.
$teamname[1] = "Red Sox"
$teamname[2] = "Gian

script and html conflict in trying to create a header.
I have an error is occurring because of an html webpage with a "php require" at the top of

Connecion issue
Hi,

For some reason, I keep getting this error when trying to connect:

Warning: mysql_

mail() problem
Hi Guys,

I've set up a contact email form. It sends the information fine, but it sends it to

problem with refreshing
in my site, i have an index page, it has a main div. this main div's content is changing according t

Preg_match with an array
is there an away to use preg_match with an array?

i want to check a string with an array to s

[function.file]: failed to open stream: No such file or directory
Okay I wrote this little script to upload a csv file that is located on my webhosts server to a mysq

Multiple Options for a Single Page
For this example I want to use the Handlers option which is under Fed Admin and all the related codi

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash