/    Sign up×
Community /Pin to ProfileBookmark

javascript: problem with netscape

Hi, when I try to run the following in netscape or mozilla I get this error

[code]
<script language=”javascript”>
function load_image(product_code, image, width, height)
{
window.open(‘image_view.php?product_code=’+product_code+’?=’+image,’_blank’,’location=no,left=200, top=200, screenX=200, screenY=200, menubar=no, resizable=no, scrollbar=no, toolbar=no, titlebar=no, width=’+width+’, height=’+height);
}
</script>
<a href=”java script:load_image(‘7302′,’product’,350,450)”>
<img src=”http://images7.wowwoman.com/images/7/LING014_6870big.jpg” width=”160″ height=”216″ class=”product” /></a>
[/code]

the error

[code]
Error: load_image is not defined
[/code]

Thanks in advance
Rob

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@FangSep 05.2003 — You have to define string variables and then put these variables into window.open

var url_name="mypage.html";

var Name="winhandle";

var Features="location=no,directories=no,etc...";

window.open(url_name, Name, Features);
Copy linkTweet thisAlerts:
@CharlesSep 05.2003 — [font=georgia]You're going to have problems with a lot of browsers. And you'll make a page that doesn't work at all for the 13% of users who do not use JavaScript. Instead use:[/font]

[font=monospace]<a href="image_view.php?product_code=7302?=product" onclick="window.open(this.href, '', 'height=450,width=350,left=200,top=200,screenX=200,screenY=200'); return false">[/font]
×

Success!

Help @OhLordy spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...