Problem with a Javascript form

Posted on 2008-10-23
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" />

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

whattext = _root.searchtext.text

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


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

Any help is appreciated.
Question by:Rabel
  • 2
  • 2
LVL 39

Expert Comment

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?


Author Comment

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

Accepted Solution

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?

Author Comment

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



Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Recently, I was asked to recommend a tracking system to be implemented on a clients website. As the entire site was built on flash, my first thought was to suggest custom built tracking system. However, our company at that point of time didn't h…
I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…

810 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