Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Coding Forum


You are currently viewing our Coding Forum as a guest. Please register to participate.
Login



Reply
Pop-up windows not working
Old 10-10-2003, 08:23 AM Pop-up windows not working
brit
Guest

Posts: n/a
Trades:
I want to implement a pop-windows into the following script, but it doesnt work. Does anyone know what part of coding is wrong; it works without pop windows, just not when I have them in.

Heres the script;


<head>
<p><br>
<style type="text/css">
<!--
body {
background-image:'http://www.itsmysite.com/brit/images/Sophie_Ellis-Bextor_02.jpg';
background-repeat:no-repeat;
}
A {text-decoration:none;}
A:link,A:visited {color: #FF99CC;}
A:hover,A:active {color: #FF0000;}
//-->
</style>
</head>

<body><script language="JavaScript1.2">

/*
Cross browser Marquee II- © Dynamic Drive (www.dynamicdrive.com)
For full source code, 100's more DHTML scripts, and TOS, visit http://www.dynamicdrive.com
Credit MUST stay intact
*/

//Specify the marquee's width (in pixels)
var marqueewidth="640px"
//Specify the marquee's height
var marqueeheight="175px"
//Specify the marquee's marquee speed (larger is faster 1-10)
var marqueespeed=1
//Pause marquee onMousever (0=no. 1=yes)?
var pauseit=1

//Specify the marquee's content
//Keep all content on ONE line, and backslash any single quotations (ie: that's great):

var marqueecontent='<font face="Verdana"color="#FF99CC"><p><br><p><br><p><br >text,etc...<a href=" http://www.yahoo.com" onClick="MyWindow=window.open('http://www.yahoo.com','MyWindow','toolbar=yes,location=ye s,directories=yes,status=yes,menubar=yes,scrollbar s=yes,resizable=yes,width=600,height=300'); return false;">yahoo</a></font>'


Thanks!!
Reply With Quote
 
 
Register now for full access!
Old 10-10-2003, 08:26 AM
brit
Guest

Posts: n/a
Trades:
Btw, when in place, I have made sure content is all on one line, even though it doesnt show like that here, so its not that either...
Reply With Quote
 
Old 10-12-2003, 12:47 PM
ACJavascript's Avatar
Humble Mod

Posts: 548
Location: CT, USA
Trades: 0
If you look at your code you well see when you call the window.open function it seperates the attributes with a '

And you start your variable that holds all this information with a '.

THats probably the error. What I suggest is make a fuction seperate of the var marquee content.

and just call it. Like onClick="gothere()"

function gothere(){

window.open ect...
__________________

Please login or register to view this content. Registration is FREE
- 100 Satisfied Customers - Custom Programming and Web Development
ACJavascript is offline
Reply With Quote
View Public Profile Visit ACJavascript's homepage!
 
Old 10-14-2003, 04:36 AM
scottfree's Avatar
Extreme Talker

Posts: 234
Location: Hamburg
Trades: 0
It is also not logical to have the link in the href="..." as the address is opened in the new window and in the main window. To keep the current page in the main window without reloading use, href="#".
Here is what I usually use:
<a href=\"#\" onClick=\"javascript:window.open('/images/pic2.jpg','pic','width=525,height=700,left=10,top= 10,scrollbars,resize')\">

Try to use the \ before the double quotes as these need to be commented out sometimes.
Or used as a function:

function OPENWIN(Target2)
{
var Target;
Target = window.open("/images/"+Target2, "Target", "width=450,height=650,left=100,top=0,scrollbar s=1, resizable=1");
Target.window.focus();
}
The Target2 in the parameter list will be the image filename.
Hopefully this helps you.
__________________
I think, therefore I am..... I think.
scottfree is offline
Reply With Quote
View Public Profile Visit scottfree's homepage!
 
Old 10-15-2003, 06:41 AM
brit
Guest

Posts: n/a
Trades:
Thanks!!
Reply With Quote
 
Reply     « Reply to Pop-up windows not working
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.28648 seconds with 12 queries