window.open with php header

J

Josh Burkard

Hello

i want to create a link to a php script witch contains special headers.

if i create the link like below, all is ok.
<A HREF="script.php?id=1">

If i create the link with JavaScript like this:
window.open("script.php?id=1");
i receive an error-message like script.php can't be downloaded.

What can i do?

Best regards
Josh
 
A

ASM

Josh Burkard a écrit :
If i create the link with JavaScript like this:
window.open("script.php?id=1");
i receive an error-message like script.php can't be downloaded.

Really :

<a href="#" onclick="window.open('script.php?id=1');return false;">
my php
</a>

doesn't work ?

your browser accepts popups ?
 
U

uoL

hello,

i think u r missing some parameters I would do

window.open ("location","name","parameters");

parameters for example: "width=100,height=100" etc

hope that help,
bye
 
J

Josh Burkard

This wasn't the solution. i tried this before.

i've found now the solution:

window.location.href = 'script.php?id=1';

Thanks and Best regards
Josh
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top