javascript:poponload('main.htm');

I have two files
1.> main.html
2.> try-demo.html

From try-demo I am trying to open main.html. However I am getting an error in the javascript. Please evaluate my code below and let me know.
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>JavaScript Popup Example 3</title>
 
<script language="JavaScript1.2" type="text/javascript">
function poponload(url)
{
testwindow= window.open(url, "Stock Navigator","location=0,status=0,scrollbars=0,menubar=0,toolbar=0,width=1024,height=768,left=0 top=0 fullscreen=1");
}
</script>
</head>
<body>
<a href="javascript:poponload('main.htm');">Demo</a>
</body>
</html>

Open in new window

jbajajAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Bill-HansonCommented:
Your parameter list is not fully comma separated.  Try this:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>JavaScript Popup Example 3</title>
 
<script language="JavaScript1.2" type="text/javascript">
function poponload(url)
{
testwindow= window.open(url, "Stock Navigator","location=0,status=0,scrollbars=0,menubar=0,toolbar=0,width=1024,height=768,left=0,top=0,fullscreen=1");
}
</script>
</head>
<body>
<a href="javascript:poponload('main.htm');">Demo</a>
</body>
</html>

Open in new window

0
erikTsomikSystem Architect, CF programmer Commented:
Ok you forgot to include single quotes . And it should look like this


<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>JavaScript Popup Example 3</title>
 
<script language="JavaScript1.2" type="text/javascript">
 
 
function poponload(url)
{
window.open('url',null,
    "height=200,width=400,status=yes,toolbar=no,menubar=no,location=no");
}
 
</script>
 
</head>
<body>
 
<a href="javascript:poponload();">Demo2</a>
 
</body>
</html>

Open in new window

0
contactkarthiCommented:
as there menu and tool bars... replace the stocknavigator to null
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>JavaScript Popup Example 3</title>
 
<script language="JavaScript1.2" type="text/javascript">
function poponload(url)
{
testwindow= window.open(url,null,"location=0,status=0,scrollbars=0,menubar=0,toolbar=0,width=1024,height=768,left=0 top=0 fullscreen=1");
}
</script>
</head>
<body>
<a href="javascript:poponload('main.htm');">Demo</a>
</body>
</html>

Open in new window

0
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

erikTsomikSystem Architect, CF programmer Commented:
MY code is working just fine . Checked it a million times
0
contactkarthiCommented:
>> erikTsomik

no need of single quote for url
0
Bill-HansonCommented:
>> contactkarthi

"Stock Navigator" is just the name given to this popup.  No need to null it.

The only problem with the original code above is the param list.
0
erikTsomikSystem Architect, CF programmer Commented:
it does need . check the syntax . And the code is working well
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
erikTsomikSystem Architect, CF programmer Commented:
Thank you for the points
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
JavaScript

From novice to tech pro — start learning today.