Page 1 of 1
generating data in a browser page- please help
Posted: Wed Jul 02, 2003 9:45 am
by sauron98
Hi All
Im still having this horrible problem...
currently when a user selects a cd image, the script calls a function, opens a window and presents the data in a preformated page heres the script:
function view(cd_id,cd_title,cd_image)
{
win1=window.open("view_cd_image.php?cd_id="+cd_id+"&cd_title="+cd_title+"&cd_image="+cd_image,"","width=650,height=250,top=100,bottom=100,left=100")
}
The problem is I need the data and the page 'view_cd_image.php' to be presented in a normal _blank browser window. Can anyone help me change this...ive tried everything.
Thanks a lot
Dan
Posted: Wed Jul 02, 2003 10:53 am
by patrikG
If I understand you correctly, you want a "normal" browser-window with toolbar, menubar, statusbar etc.?
If so, use this
Code: Select all
function view(cd_id,cd_title,cd_image)
{
win1=window.open("view_cd_image.php?cd_id="+cd_id+"&cd_title="+cd_title+"&cd_image="+cd_image,"","width=650,height=250,top=100,bottom=100,left=100,toolbar=yes,menubar=yes,status=yes,location=yes")
}
P.S.: This is Javascript, not PHP - would have been better to post it in the client-side forum

still not working
Posted: Wed Jul 02, 2003 11:20 am
by sauron98
Hi thanks very uch for that..yes youre right this is script..maybe i should have posted on the different forum...
I used that exactly...as quoted and its still throwing up a window with no status bar etc..
what i really want is to do is just have the data presented in a standard browser page..in a chosen frame...
excuse my ignorance
Dan
Posted: Wed Jul 02, 2003 11:58 am
by liljester
in a frame?
you need to tell the window where to open =)
window.open("URL", "window or frame name", "options");
Posted: Wed Jul 02, 2003 12:01 pm
by liljester
tho ive never tried it in a frame.... the only other way i can think to do it is to just use a link with the TARGET attribute...
<A HREF="mypage.php" TARGET="frame name">link</A>
hope that helps
Posted: Wed Jul 02, 2003 12:32 pm
by sauron98
thanks mate
Ive tried to construct the line as you said...but just cant do it...im new to this
how would i corectly present the script above but adding the link attribute
cheers Dan
Posted: Wed Jul 02, 2003 12:41 pm
by sauron98
Can this:
function view(cd_id,cd_title,cd_image)
{
win1=window.open("view_cd_image.php?cd_id="+cd_id+"&cd_title="+cd_title+"&cd_image="+cd_image,"","width=650,height=250,top=100,bottom=100,left=100")
}
be changed to open in a articular frame and normal browser window?
cheers Dan
Posted: Wed Jul 02, 2003 12:53 pm
by liljester
hrm... lemme check
Posted: Wed Jul 02, 2003 1:03 pm
by liljester
below where you seen "FRAME NAME", replace that with the name of the frame you want the page to open in.
win1=window.open("view_cd_image.php?cd_id="+cd_id+"&cd_title="+cd_title+"&cd_image="+cd_image,"FRAME NAME","");
if that still isnt what you're after, ill have to see the page your working on... cause im not sure what you are trying to do =)
Posted: Wed Jul 02, 2003 1:27 pm
by sauron98
GREAT! for the first time it worked!!...ive been trying to sort this little problem for 2 days!
one more thing...how would add the page permissions to that line you gave me...i mean allow scroll bars etc...
cheers your the boss!