I am trying to build a search function that looks pretty on the web. I’ve got a perfectly fine searching set up, but now need to load into a specific area on the page and am trying to do it with iFrame. Here is my code:
Subject: How to combine the usefullness of @functions into iFrames…
Hi there,
are you using a hotspot button with the @URLopen code in it? If so, in the coding pane at the bottom, change the box on the left which says “Client” to “Web”, and you can put your Javascript in there. From your code, the javascript would be something like :
This gets the results into the iFrame that I wanted to get it into. The next prob is finding the DbName like I used to be able to from @function. I have hard-coded the DbName that I want to search as I can’t quite get it to find it from my drop-down list of databases to search. I have a field called dbName that has a long list of dbs in it. So I’d like to get that field when the user chooses it and then hits the search button. Can’t quite get it though just yet.
Thanks for putting me on the right track though! I am not an avid user of Jscript, so just muddling along.
Subject: RE: How to combine the usefullness of @functions into iFrames…
There are a couple of gotcha’s when it comes to drop down fields.
Firstly, unless you use keyword synonyms in the field domino doesn’t put value=“XXX” in the HTML option tag. So rather than saying
It says :
When you try and get the value with javascript in IE, it doesn’t exist so nothing is returned. To get round it, use keyword synonyms in the drop down box. i.e.
Value1|Value1
Value2|Value2
Value2|Value3
Although it seems to work now, IE didn’t used to like selecting from drop down lists either, so you might need to use this code to get the value, rather than field.value…
op = document.forms[0].Field.selectedIndex;
db = document.forms[0].Field.options[op].value);
Anyway, give it a go, and see if it makes any difference. Let us know how it goes,
and that works fine now. That part was really confusing as, like you say, the value doesn’t seem to exist even though I can see the changed ‘value’. All looks good now.