473,378 Members | 1,138 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Posting a form

emu
Hi

I have a form which is contained in a <div> in the template which
searches our Intranet, Staff directory or Google. This form needs to
work client side so I am using JavaScript and HTML no server code. It
need to submit to itself for now

I want the form to show the last value selected when they submit the
form. It would be good to bring through the name that they were
searching for as well.

Any idea greatly appreciated.

I have edited this code down to basics

<div id="search">

<script type="text/javascript" language="JavaScript">

function ActionDeterminator()
{
f = document.selectSearchForm.searchme.selectedIndex;
x = document.selectSearchForm.searchme[f].value;
document.selectSearchForm.action=x

if (f=1){
document.selectSearchForm.name.value=document.sele ctSearchForm.queries_search_query.value
}

if (f=2){
document.selectSearchForm.q.value=document.selectS earchForm.queries_search_query.value
}

return true;
}

</script>

<form name="selectSearchForm" action="" method="get" onSubmit="return
ActionDeterminator();" />
<input type=hidden name=mode value=results />
<input type=hidden name=name />
<input type=hidden name=q />

<strong>search</strong>&nbsp;
<select name="searchme" onChange="return ActionDeterminator();">
<option value="http://localhost/search2.html"
name="Intranet">Intranet</option>
<option value="http://localhost/search2.html"
name="Staff directory">Staff directory</option>
<option value="http://www.google.com/search"
name="Google">WWW (Google)</option>
</select>
&nbsp;
<input name="queries_search_query" type="text" value="" />
<input type=hidden name=submit VALUE="Search" />
<input type="image" alt="search" src="go.gif"
value="Search" style="display:inline"/>
</form>

</div>

Jul 23 '05 #1
2 1373
In article <11**********************@o13g2000cwo.googlegroups .com>,
em*@bigpond.net.au enlightened us with...
I have a form which is contained in a <div> in the template which
searches our Intranet, Staff directory or Google. This form needs to
work client side so I am using JavaScript and HTML no server code. It
need to submit to itself for now

I want the form to show the last value selected when they submit the
form.


Like this one does?
http://www.ipwebdesign.net/kaelisSpa..._parseUrl.html
--
--
~kaeli~
If a turtle doesn't have a shell, is he homeless or naked?
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 23 '05 #2
M E
Just what I was looking for.

I will need to get it to work as part of the template but it sends me on
the right track.

Thanks

*** Sent via Developersdex http://www.developersdex.com ***
Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: DaveFash | last post by:
Posting variables from an HTML FORM, via the Request.Form function on the receiving ASP page is great. But how can you POST a Form variable to an ASP page -- without a human pushing a Submit...
2
by: Jeff Baker | last post by:
How does one post to an ASPX page using the WebClient when the form name is required?
4
by: Stacey Levine | last post by:
Please tell me if this makes sense. I have written an ASPX page to handle and process POSTed XML data to it. I am expected the data to be in the Request.Form object. This works perfectly fine...
13
by: Ian.Suttle | last post by:
I am have been researching this issue to no end, so any help would be very much appreciated. I have a page with form tags. Inside of the form tags is a panel that contains a user control. The...
6
by: KC | last post by:
How would I post data from a listbox that allows multiple selections? How do you join the name/value pairs for the posted data? And for extra credit: Where is a page posting to when there is no...
2
by: Esa | last post by:
Hi, I'm having problems with one strange web system where submitting an application and making queries about its handling status require a series of form submits and response parsing - all in...
2
by: Peter2 | last post by:
Hi, I have a problem posting non-ASCII characters in FORM fields between classic ASP and ASP.NET. I use a fully patched Windows 2000 Advanced Server with .net 2.0 and visual Studio 2005 installed,...
1
PEB
by: PEB | last post by:
POSTING GUIDELINES Please follow these guidelines when posting questions Post your question in a relevant forum Do NOT PM questions to individual experts - This is not fair on them and...
6
by: fnoppie | last post by:
Hi, I am near to desperation as I have a million things to get a solution for my problem. I have to post a multipart message to a url that consists of a xml file and an binary file (pdf)....
1
by: gnawz | last post by:
Hi guys, I have a couple of php files that perform various tasks. I will use fields in my system and provide code as well I need help as follows: My database contains the fields Category...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.