ASP and Javascript with Frames

Results 1 to 2 of 2

Thread: ASP and Javascript with Frames

  1. #1
    Join Date
    Dec 1969

    Default ASP and Javascript with Frames

    Hi,<BR><BR>If anyone can point me in the right direction with this, I would be eternally thankful.<BR><BR>I have a page (Intranet - all users on IE 5.5) with a top frame and a main frame. The top frame has a "Search the Phone Book" form where users can enter search criteria. I am having trouble with parsing the information to the main frame.<BR><BR>I have tried an onClick of the submit button to do this:<BR><BR>top.frames[1].location = &#039;/newlook/Search-Results.asp?searchField=&#039;+document.SearchForm .criteria.options[document.SearchForm.criteria.selectedIndex].value+&#039;&searchKeyword=&#039;+keywordstring+& #039;&searchStation=&#039;+document.SearchForm.sea rchStation.options[document.SearchForm.searchStation.selectedIndex].value;<BR><BR>and<BR><BR>top.location = &#039;/phone/frameset.asp?searchField=&#039;+document.SearchFor m.criteria.options[document.SearchForm.criteria.selectedIndex].value+&#039;&searchKeyword=&#039;+keywordstring+& #039;&searchStation=&#039;+document.SearchForm.sea rchStation.options[document.SearchForm.searchStation.selectedIndex].value;<BR><BR>But neither seem to work (the second one sends the info to a frameset page which then parses it to the search-results.asp page.<BR><BR>If anyone has ever come up with something that actually works, can you please help me out? I&#039;m not good at javascript :(<BR><BR>Thanks for reading this, I know its not too relevant, but I&#039;m completely stuck..<BR><BR>Thanks again<BR>Renee

  2. #2
    Join Date
    Dec 1969

    Default But WHAT doesn't work???

    You give us little to go on.<BR><BR>I *know* that the <BR>&nbsp; &nbsp; parent.BottomFrame.location.href = &#039;xyz.asp&#039;<BR>trick works, as I&#039;ve used it. Which means that your way of referencing the frame should work, too.<BR><BR>I *do* see a major flaw in your code: You need to code <BR>... + &#039;&searchKeyword=&#039; + escape(keywordstring) _ ...<BR>to handle the case when the user puts a space or special character in the keywordstring.<BR><BR>But, anyway, you have to tell us WHAT doesn&#039;t work.<BR><BR><BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts