Solved

Problem with a Javascript form

Posted on 2008-10-23
4
164 Views
Last Modified: 2010-04-03
Hello I am trying to apply a search to my site - using the html form code

<form style="margin-top: 0px; margin-bottom: 0px; width:300px;" name="SearchBoxForm" action="searchadv.aspx" method="GET" onSubmit="return SearchBoxForm_Validator(this)">
<span class="style1"><span class="style2">Search:</span>
<input name="SearchTerm" size="30" />
</span><img src="images/spacer.gif" width="4" height="4" />
<input name="submit" type="Image" align="middle" src="skins/Skin_10/images/go.gif" border="0" />
<input type="hidden" name="IsSubmit" value="true" />
</form>

I tried to use a code like this from breaking down the code above

on(release){
whattext = _root.searchtext.text
trace(whattext)
getURL("javascript:SearchBoxForm_Validator(whattext)","_self","GET")
}

But there is the onSubmit and the action in the form so I dont know how to pass it, I also tried this coding and changing the input on the flash file to SearchTerm

on(release){
getURL("searchadv.aspx","_self","POST")
}

That jumps to the page but does nothing with the search, like you would expect.

Any help is appreciated.
Thanks
Randy
0
Comment
Question by:Rabel
  • 2
  • 2
4 Comments
 
LVL 39

Expert Comment

by:blue-genie
ID: 22812828
hi just a question. the asp in handling the search?

if so why do you need the javascript?
i'm no expert but just wondering out loud.
if you get the search string in flash and pass that to your asp page and have that return the results, wouldn't that work better?

0
 
LVL 2

Author Comment

by:Rabel
ID: 22816747
thanks genie, but im not sure how to get the string. Any ideas?
0
 
LVL 39

Accepted Solution

by:
blue-genie earned 240 total points
ID: 22819461
i'm assuming you have a form in flash.
i'm assuming there's an input text there for the seach string yes?
so then just get the value out of the text field pass it to asp that does the sql query returns values and you're gonna display it right?

i'm assuming you have the asp part sorted?
0
 
LVL 2

Author Comment

by:Rabel
ID: 22845065
Sorry Genie it was passing alot more then the searchterm string but it looks like that was all i needed. I have the input text field and then I use this code

on(release){
      where="searchadv.aspx?SearchTerm="+_root.SearchTerm.text
      getURL(where,"_self","POST")
}

Thanks
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

This is a very simple example to help those of you who are still migrating from AS2 to AS3 understand the redesigned event model in AS3. In AS2.0, event functions (that is, the function to be performed when an event is fired) were stored as a pro…
I have found that much of my time doing support ends up being a constant repetition of the same steps to different people.  Early on I stated using web pages with Frequently Asked Questions (FAQs) to alleviate most of the burden.  Sometimes this jus…
The goal of the tutorial is to teach the user how to select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now