473,385 Members | 1,764 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,385 software developers and data experts.

opening a popup window with php

I want to open a new window which i predefine (heigth, width, toolbar etc.) from a link within php

My javascript code looks like this:

[HTML]<script type="text/javascript">
var newwindow;
function poptastic(url)
{
newwindow=window.open(url,'name','height=700,width =600');

}
</script>[/HTML]

And my php code looks like this:

[HTML]<?php
print "<a href=" . Chr(34) . "search2.php?" . "JobNbr=" . $jtsstatus['TrackingNbr'] . Chr(34) . ">" . $jtsstatus['TrackingNbr'] . "</a>"; ?>[/HTML]

Can anyone tell me how to do that............????????
Aug 16 '07 #1
2 1676
ak1dnar
1,584 Expert 1GB
You Can print your <a></a> tags like in this format.

Expand|Select|Wrap|Line Numbers
  1. print "<a href=\"search2.php?JobNbr={$jtsstatus['TrackingNbr']}\">{$jtsstatus['TrackingNbr']}</a>"
  2.  
But You need to call to javascript function with THE url parameter.

Expand|Select|Wrap|Line Numbers
  1. <a href="#" onclick="Function_Name('URL HERE')">Link Display Name</a>
And What is that newwindow on JavaScript remove it.Read More Here
Aug 16 '07 #2
it doesn't open a popup window. It opens the new window in the same window. Here is what i did:

javascript:

[HTML]<script type="text/javascript">

function poptastic(url)
{
window.open(url,'name','height=700,width=600');

}
</script>[/HTML]

php:

[HTML]<a href="#" onclick="poptastic('search2.php?JobNbr={$jtsstatus['TrackingNbr']}')">
<?php
print "<a href=\"search2.php?JobNbr={$jtsstatus['TrackingNbr']}\">{$jtsstatus['TrackingNbr']}</a>"; ?></a>[/HTML]
Aug 16 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Jawahar Rajan | last post by:
All, I have a printer friendly page that is opened when a user clicks a link on my page to get the printer friendly version, How ever when they close out the printer friendly version and return to...
1
by: MJEASSOC | last post by:
I need some help with closing a popup window. I'm making an online portfolio, that has one base page with text and thumbnails. When a user clicks on a thumb, a new window opens containing a larger...
1
by: Todd Cary | last post by:
I am using PHP to create a button on a window so that a new window is created when the button is clicked. Is there a way to create a new window inline; that is create a window on top of the...
3
by: Mehmet Gunacti | last post by:
Hello, on our homepage, when pressing an anchor tag, a special sized popup window opens via javascript. but it opens very slowly. on other web pages, there are also javascript-opened windows,...
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...
0
by: Jack Addington | last post by:
I have a 'quickadd' type window for doing quick data entry. The window is launch from a MDI child and is suppose to be a re-sizable popup/child window. This is an excel type datagrid for doing...
2
by: Matt Hamilton | last post by:
I have an application page with a datagrid with a checkbox on each row. The user should check the rows they want to modify and then click a button. When the button is clicked, I have a Click...
1
by: Jennyfer J Barco | last post by:
Hello I have a datagrid and a linkbuttom in the datagrid that says Picture, every time I click on the link "Picture" my program opens a popup window showing a picture of the item the selected and...
26
by: Nospam | last post by:
I am trying to open a link in a new template window : <a onclick="windowopen('example.html','example');return false;" href="http://www.example.com" target="_blank"example link</a> such that...
1
by: paintedjazz | last post by:
I am using the following javascript to make a popup menu allow the user to navigate to different pages on a website. Yet it is opening windows as if I have <base target="some-name"> defined in the...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...

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.