Click to See Complete Forum and Search --> : javascript and .asp pages


thebeginner
07-16-2003, 05:25 PM
I am new to Javascript, but not to Web Design. I am having a difficult time deciphering some script. If someone with a kind heart and little time can explain to me what this script is doing.. I will be soo thankful... I don't have access to their server at this time and can't tell you what other pages exist. With regards to my knowledge of JavaScript --- at this pt. I understand the basics of variables, if-then, prompts, links and methods, but I am having a hard time figuring out the following:


1) http://www.drary.com/origin.asp - view source here.

where the validator FrontPage_Form1_Validator(the form)for this script is originally defined and what the IF statement means
- specifically theForm.Origin.selectedIndex == 0
theForm.Origin.focus();

2)on submit= "return FrontPage_Form1_Validator(this)" ??

3)re --- .asp pages..

why or should I say how... are you able to use one page origin.asp once the viewer has made their choice on the dropdown box and have it load into this page. In other words.. how does this script get the choices to load without changing the page..?? do I need to learn .asp to get this thing figured out.. please say no... :) :)

thank a million and one..

Khalid Ali
07-16-2003, 05:52 PM
No...

:D

in reality I am afrid you need to learn sererside lang...

specifically theForm.Origin.selectedIndex == 0

here its trying to set the selected value in the listbox to the first value

theForm.Origin.focus();

setting focus to the listbox

on submit= "return FrontPage_Form1_Validator(this)"

the above means that validate the form values and all is validated then subit the form to the value thats in the action attribute of the form element

thebeginner
07-17-2003, 02:51 PM
Thank you for the feedback.. looks like this is a bit over my head.. Well.. if I can't code it myself ..(just yet.. <grin> )Can you suggest a simple script to use for "site search" within just one website. I downloaded this zip file but don't know exactly how to change the variables they suggest or how to insert it properly into the web page so it works correctly..

Any help.??