473,387 Members | 2,436 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

php window.open

Hello,
I am trying to open a query in a new window with say widht 550 and
hight 350, I have searched google and found some answears using a
javascript function, but it did not help here is my current link.
<td width="33%" height="22" align="center"><font color="#333333"> <a
href="/video_pop.php?GenderID=<?php echo $row_rs_Gender['GenderID']; ?>
" target="_blank"class="centerTable"> <img src="<?php echo
$row_rs_Gender['Pic1']; ?>" border="0"></a></font></td>
Can some one please shed some light

Thanks
Drisco

Jul 23 '05 #1
8 3135
Finaly got it to work, no replay needed

Drisco

Jul 23 '05 #2
looks like you're gonna have to run that php script externally and use
javascript to resize the window using
window.open('address','name','width=550; height=350;') If that don't
work i dunno what will...

Jul 23 '05 #3
Thank you for replying,
here is what I have so far,

<SCRIPT TYPE="text/javascript" LANGUAGE="javascript">

function vid_popup(name)
{
window.focus();
url = name + ".php?GenderID=<?php echo $row_rs_Gender['GenderID']; ?>
";
pop_width = (name != 'video_pop'? 710:710);
pop_height = (name != 'video_pop'? 370:370);
param = "width=" + pop_width + ",height=" + pop_height +
",resizable=no,scrollbars=no";
name += "_popup";
window.open(url,name,param);
}
</SCRIPT>

<a href="video_pop.php?GenderID=<?php echo
$row_rs_Gender['GenderID'];?>" CLASS="vclip"
onClick="vid_popup('video_pop'); return false" TARGET="_blank"><img
src=<?php echo $row_rs_Gender['Pic1']; ?> border="0"></A
This works, but all rows bring up the first artist in the row, then
when I click on the next page, it brings up the first artist in the
second page, this happens on all next and previous pages.
another thing is the mouseover shows the correct IDs in the status bar.
any thoughts?
Thanks
Drisco

Jul 23 '05 #4
I have seen this work on much much complexd scale on some sites,
Let me explain one more time.
I have $maxRows_rs_Gender = 10; and $pageNum_rs_Gender = 0;
my page desplays 10 entries, each entry has a different ID, but with
the script I mentioned in the previous post, all 10 entries link to 1
ID, which is same as the first ID in the first row, but mouseover shows
a different ID for each row when you look at the status bar.

could some one please help, I am stuck and can't go any further with my
project

your help is very very much appreciated

Drisco

Jul 23 '05 #5
Is this that hard to achieve? or this is the slowest NG on the net,
Can any one please take a moment and help a desprate guy
Thank you in advance
Drisco

Jul 23 '05 #6
Drisco wrote:
Is this that hard to achieve? or this is the slowest NG on the net,
Can any one please take a moment and help a desprate guy
Thank you in advance
Drisco


What you have posted is a munge of PHP and JavaScript. This group
deals with JavaScript, though many here also know PHP.

Post what the client (browser) receives, not the code that you feed to
your server.

Post a minimal example that displays the error - debugging invisible
code is a challenge that most will pass on.
--
Rob
Jul 23 '05 #7
First, thanks for the reply, and sorry about the munging :)
I pasted the exact link bellow that I have currently on my table. It
works as expected, but I need to have the target window come up with a
certain size, no address bar, and no scrolls etc..

<a href="video_pop.php?GenderID=*<?php echo
$row_rs_Gender['GenderID']; ?> " target="_blank"class="centerTa*ble">
<img src="<?php echo $row_rs_Gender['Pic1']; ?>" border="0"></a>
Please let me know if you need any more details

Thank you again
Drisco

Jul 23 '05 #8
"Drisco" <db******@hotmail.com> wrote in message
news:11*********************@g44g2000cwa.googlegro ups.com...
First, thanks for the reply, and sorry about the munging :)
I pasted the exact link bellow that I have currently on my table. It
works as expected, but I need to have the target window come up with a
certain size, no address bar, and no scrolls etc..

<a href="video_pop.php?GenderID=*<?php echo
$row_rs_Gender['GenderID']; ?> " target="_blank"class="centerTa*ble">
<img src="<?php echo $row_rs_Gender['Pic1']; ?>" border="0"></a>
Use:

<a href="..."
target="..."
class="..."
onclick="return openWindow(this);"
...</a>


<script type="text/javascript">
function openWindow(lnk)
{
window.open(
lnk.href,
lnk.target,
'...attributes...'
);
return false;
}
</script>

....attributes... can be anything documented:
<url: http://docs.sun.com/source/816-6408-...ow.htm#1202731 />
<url:
http://www.mozilla.org/docs/dom/domr...6.html#1019331 />
<url:
http://msdn.microsoft.com/workshop/a...ods/open_1.asp
/>

Note that some popup blockers will block this script. Then again, you
can configure Gecko-based browsers to ignore <A ... TARGET="..."> as
well, so you're not going be guarantee to see any behaviour you expect
when attempting to open a new browser window on the visitor's computer.

--
Grant Wagner <gw*****@agricoreunited.com>
comp.lang.javascript FAQ - http://jibbering.com/faq
Jul 23 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Michael | last post by:
I am trying to allow a user to view a PDF in a new window. I currently have this working using the following: <a href="./pdf.do?parameter=01121980" target="top"><b>pdf</b></a> The problem...
13
by: Kai Grossjohann | last post by:
It seems that Ctrl-N in Mozilla opens a new empty browser window. That's fine, I don't need to do anything about it. But Ctrl-N in IE appears to clone the current window. Is there a way to...
10
by: Marshall Dudley | last post by:
When I do the following line in Netscape, the popup loads as it should, but the parent window usually, but not always, reloads as well. <a href="#"...
2
by: Samir Pandey | last post by:
Hello, I am using the following javascript code to open a new window. Somehow, IE always opens a new window. It doesn't open target url in the window name given. All i want is, if there is a...
3
by: NeverLift | last post by:
But, if it's not open, I don't want to open it . . . using window.open will open it if it doesn't exist, even if the url in that open is null (the window is then empty -- but it's open). The...
14
by: D. Alvarado | last post by:
Hello, I am trying to open a window containing an image and I would like the image to be flush against the window -- i.e. have no padding or border. Can I make this happen with a single call to a...
6
by: G Dean Blake | last post by:
in my aspx app I am writing a stream that works fine but it replaces what is in the client browser window. The code is as follows: .. .. HttpContext.Current.Response.ClearHeaders()...
8
by: johnsonholding | last post by:
Here is the code for a pop-up window that works in Firefox and not in IE - I get a java error or something, Here is the code : </script> <SCRIPT language="JavaScript"...
7
by: anthony.turcotte | last post by:
Hi, I've looked for a solution to this problem on google, read posts in this newsgroup and I still haven't found anything that could help me. Here's the scenario. 1. User accesses...
3
by: Andrew Poulos | last post by:
There's a HTA application that's running on a local computer (not from a URL) and the user can open a new HTML window by clicking a button The first time the user clicks the button the window...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.