Click to See Complete Forum and Search --> : Printing info from an external js on to html


Alx1230
01-02-2004, 08:15 PM
Hey,

Is there anyway to make an external .JS write the information to the html?

Here's what I'm trying to do:

I have this page:http://www.airborneaircrafts.com/gallery/search/searchresults.htm?searchField=Boeing+747&srcriteria=all

it calls an external javascript to display the information:

<script language="JavaScript" SRC="searchFunctions.js"></SCRIPT>
<script language="JavaScript" SRC="searchIndex.js"></SCRIPT>
<SCRIPT language="Javascript">
doSearch()
</SCRIPT>


What I would like to do is have this information printed inside the searchresults.htm so if you were to look at the code of the HTML you would see the information.

David Harrison
01-02-2004, 09:18 PM
To do that you could do one of two things. Write the information into a pop-up window, but this only works in IE and those with a pop-up dis-abler wouldn't be able to see the pop-up.

The alternative would be to use a server side script because that would work for everybody. (You could even use JavaScript for that as a server-side jsp page).

Although I can't see why you want the code to appear as source in the page, the user doesn't care as long as what appears on the page is alright.

Alx1230
01-02-2004, 09:37 PM
The only reason I'd like to do that is for that serach engines can index it with actual information rather than having html's that forward you to that page.

David Harrison
01-02-2004, 09:41 PM
If you want searchengine indexing, then I think the only way would be to have many HTML pages with the stuff on. You could always use server-side includes in pages with most of the content on already I suppose.

Alx1230
01-02-2004, 10:02 PM
Okay well thanks for your help! :cool:

David Harrison
01-02-2004, 10:21 PM
Anytime. :)