| |
Deakin
Posts: 1
Score: 0
Joined: 4/29/2005
From:
Status: offline
|
hello, I am using this script to do a search in an xml doc. right now the results load in a another frame. but I would like to load it in the same frame as the search form. I remeber useing a div in the past but it's been awhile. is that right <html> <body> <style> blockquote { } </style> <script language="VbScript" type="text/vbscript"> function build_form() document.write("<form name='reportSearch' method='post' onsubmit='search_results(reportSearch.groupPram.value)' language='VbScript'>") document.write("<input name='groupPram' type='text'/>") document.write("<button type='submit'>Submit</button>") document.write("</form>") end function function search_results(id) top.frames("bottom_Frame").document.location.reload() set xmlDoc=CreateObject("Microsoft.XMLDOM") xmlDoc.async="false" xmlDoc.load("search.xml") dim count dim group count = 0 group = id set nodes=xmlDoc.selectNodes("/report_list/report[@group='"+group+"']//text()") top.frames("bottom_Frame").document.write("<html><body><blockquote>") for each x in nodes count = count + 1 if count mod 2 then reportID=x.xml top.frames("bottom_Frame").document.write("<a href='launch_page.htm?"+reportID+"' target='top'>"+x.xml+"</a>" ) top.frames("bottom_Frame").document.write("<br/>") if count mod 2 = 0 then top.frames("bottom_Frame").document.write("</blockquote><blockquote>") next top.frames("bottom_Frame").document.write("<br/><br/><p>end</body></html>") end function document.write(build_form()) </script> </body> </html> thanks for any help
|
|