kamio
12-18-2002, 09:49 AM
I am currently creating a site that acts as a database. Essentially a few data pages with an awful lot of navigation pages. The problem i am having is that some of the data overlaps. So the navigation essentially needs to point to two different places.
The person I am building this for would like to see a pop up window in this situation advising of the overlap and giving links to the different data sources.
What I want to achieve is launching the POP up window with generic text and specified links with Javascript/DHTML from within an HTML structure like this
<FORM>
<OPTION VALUE="#">the pop up window javascript with links</OPTION
<FORM>
eg. the option tags are part of a jump menu.
I am confident with HTML but Javascript is reasonably new to me. I have used free code from the internet before in my sites but never had to code any by hand.
Does anyone know if this is possible?
What code I need to use?
Where the code should sit on the page?
ie <HEAD> or <BODY> or before </OPTION>
If this isn't possible an alternative approach
Thankyou for your help in anticipation.
ANSWERS:
HI . The answer is quite straightforward. You create a pop-up window before the BODY tag and call the function where you define the pop-up attributes inside anywhere within the body part of the document. I hope this helps
Your codes should be as follows:
// a pop-up menu with links
<STYLE>
.menu {position: absolute; top: -1000; left: -1000}
</STYLE>
<script>
function showpopup(){
var win = window.createpopup();
win.show(10,10,340,200);
}
</script>
<body>
<FORM>
<OPTION VALUE="#"><A HREF=”javasript:showpopup();”>
the pop up window javascript with links </A>
</OPTION>
</FORM>
</body>
all the best frm:
Bahj
The person I am building this for would like to see a pop up window in this situation advising of the overlap and giving links to the different data sources.
What I want to achieve is launching the POP up window with generic text and specified links with Javascript/DHTML from within an HTML structure like this
<FORM>
<OPTION VALUE="#">the pop up window javascript with links</OPTION
<FORM>
eg. the option tags are part of a jump menu.
I am confident with HTML but Javascript is reasonably new to me. I have used free code from the internet before in my sites but never had to code any by hand.
Does anyone know if this is possible?
What code I need to use?
Where the code should sit on the page?
ie <HEAD> or <BODY> or before </OPTION>
If this isn't possible an alternative approach
Thankyou for your help in anticipation.
ANSWERS:
HI . The answer is quite straightforward. You create a pop-up window before the BODY tag and call the function where you define the pop-up attributes inside anywhere within the body part of the document. I hope this helps
Your codes should be as follows:
// a pop-up menu with links
<STYLE>
.menu {position: absolute; top: -1000; left: -1000}
</STYLE>
<script>
function showpopup(){
var win = window.createpopup();
win.show(10,10,340,200);
}
</script>
<body>
<FORM>
<OPTION VALUE="#"><A HREF=”javasript:showpopup();”>
the pop up window javascript with links </A>
</OPTION>
</FORM>
</body>
all the best frm:
Bahj