Random Window.open
I would like to know if there is a way in php to randomize
the following url (www.domainsample.com used as example).
I have 4 different urls I would like to use, basically changing
every time the page is accessed.
<!--
function open_on_entrance(url,name)
{
new_window = window.open('www.domainsample.com','domainsample',
'menubar,resizable,scrollbars,dependent,status')
}
// -->
</script>
View Complete Forum Thread with Replies
Related Forum Messages:
To Open A New Window
on selection of close option,can i open a new window ? <select> <option value="1" >Open</option> <option value="0" onClick="JavaScript:window.open('ajax2.php','view','height=350, width=550,scrollbars=1')">close</option> </select>
View Replies !
Open A New Window
Is there a way to open a new window, directly to the print preview view, with php or can this only be done via something like Javascript?
View Replies !
Need To Open A New Window
I have a script I am working on where I need to open a new window upon clicking a submit button, anybody ever done this? Got any ideas on how to get it accomplished?
View Replies !
Open A Window And Fit An Image
The task is to open an enlarged version of a picture clicking on a thumbnail, so I would like the popup window fits the dimension of the big picture. The paths of the big pictures are stored in a mysql table and the size in pixel of each pic could be different. I started working on my task using also a bit of Java and sound like:
View Replies !
Need [link_url] To Open In New Window
This is a piece of code thats in a php file. <tr><td align='center'><a href='$row[link_url]' onClick="javascript:window.open('waiting.php?email=$email& banner_id=$row[banner_id]& action=open','loading','toolbar=no,left=50,top=50,scrollbars=no,resizable=no,width=400,height=100,alwaysRaised=yes') "></a></td></tr> I think this is the piece I need to change. The 'waiting.php' file opens in a new window but I want the [link_url] to open in a new window aswell. Is there any piece of code that can be put into a php file to make links open in new window?
View Replies !
Open In New Window From RSS News
I'm using this simple rss parser that i would like to have open in another window. But I'm very much a beginner in php scripting. Here is the script on the page <?php require('./class.phpnet.php'); $phpxml = new phpnet_news("http://au.biz.yahoo.com/financenews/htt/financenews.xml", 1); $news = $phpxml->get_headlines(8); ?><?php for ($i = 0; $i < sizeof($news['title']); $i++) { echo '<li><a href="' . $news['link'][$i] . '">' . $news['title'][$i]. '</a></li>' echo " "; } ?>
View Replies !
Open New Browser Window
Is there any way to use PHP to open a new browser window? I'm running a script which, based on a variable, will either display a certain page in the current browser window, or open a different page in a new window. At least, that is the plan. Any suggestions on how I can do this?
View Replies !
Links Open In Another Window
I've got a site (PHP and MySql), that was made with frames, but I've decide to get rid of frames and I've made this site through cells table and CSS. But now I've got a big problem: any link I click on my menu (from the left), the new page opens in a new window and I want that the new page to be opened in the same window, the initial window. What should I do for this? I want that browser opens new pages of my site in the same window.
View Replies !
Open A New Url In Main Window With PHP
I'm looking for a way in PHP to reroute the main window. If during the build of a page in a child frame some conditions are not met, I would like to reload a login page in the main window, and not in the child frame. Code:
View Replies !
Browse->open New Window
I'm trying to figure out a way to make a browse button on a form that when clicked, it would open up a new window to display a list of selection. Once one of the item from the list would be clicked, the selection window would close and the selected item would be pasted to a text box on the page. I have been looking around to find if there is any javascript or php script available that I could use and modify but I can't find any them.
View Replies !
Window Open Troubles
I am trying to open an image in a new window: <? echo '<a onClick="window.open(' . $mosConfig_live_site . '/works/pfolder/thumb/thumb.php?src='. $mosConfig_absolute_path . '/images/place/'. $row1->picture . '&x=750&y=600&f=0,'newwin','width=750,height=600,toolbar=no');return false;" target="_blank">Click Here</a>' ?> The window will not open, however, going to the actual page and viewing the source, I see that the url is correct (http://thesiteurl/works/pfolder/thumb/image.jpg&x=750&y=600&f=0) and I can go to that url in my browser and the image pulls up just fine.
View Replies !
Condition Window Open
Trying to verify a condition based on a form post. No easyway to tell if field has been posted. Can't echo or echo alert as the php in question is layers below display. Is it possible to open a new window in php something like the following? PHP Code: $email_ba = $_POST['email_ba']; if($email_ba=Ƈ'){ window.open('about:blank', 'about_blank', 'height=400,width=600'); }
View Replies !
Thumbnail Open A New Window
I would like to change it so that when a user clicks on one of the thumbnails the picture then opens fullsize in a window of its own. <?php //connect to the database $link = mysql_connect("localhost", "admin", "pass") or die("Could not connect: " . msql_error()); mysql_select_db("gallery", $link) or die (mysql_error()); $ImageDir = "/ballooncrew/gallery/centerpieces/"; $ImageThumb = $ImageDir . "/thumbs/"; $max_cols = 4; ?> .........
View Replies !
Open Window According To Image Specification
I am working on a realty script, and an idea was passed to me to have the script when a user views an ad open a popup window that matches the width and height of the image but i am lost. i am including my source that for any help you can provide. photos are called like this image.php?Id=30 PHP Code:
View Replies !
Onclick Won't Open New Window Until After Refresh
I have a number of links to other pages in the current page. When the page is initially loaded none of the "onclick" events that call a Javascript to do a "window.open" work. However, if I merely click the window "Refresh" then all work. I'm pretty sure it's something I did in the code, but after 2 days of trying and backtracking and hours of googling, perhaps someone could suggest some things to look for or try. The source language is PHP, and the browser is IE6.
View Replies !
Clickable Link - Open New Window
I am creating directory and file arrays, which I sort and print out. Currently I have made each line a clickable link - works good. My problem is I want to now open the link in a new window. I have tried every which way I can think of to append target="_blank" I keep getting T_string errors Code:
View Replies !
Open A New Browser Window From The Server
Is there a way to open a new browser window from the server (that is without using Javascript)? (Maybe send some kind of a header?) I want the contents in the first window to remain the same but when the user clicks a button, I want another window to open and display certain results. I don't want to rely on Javascript.
View Replies !
Load Open Pre-sized Window?
I have a html form that someone fills out. Then on "submit" a php script reads what was typed in the form. It then opens a new page with a html page in it with the results. I would like this page to load as a pre-sized window (ie. 200 X 400pixels). How? This is how I have it loading the new page: PHP Code:
View Replies !
How To Open New (printer-friendly) Window
I have a php script that presents a rather simple form. After the user filled in parameters and presses <submit>, the results from a postgres database search follows on the page. Now, if the user wishes to print the page, it'll be ugly containing the form boxes. So one solution would be to present a "printer-friendly" option on the page. Clicking there will present the results in a new window free from the form boxes. I don't want to repeat the database search in this new window, just "forward" the variables to this new url.
View Replies !
Javascript Window.open Fails In IE
I have been searching the 'Net, and I can't find the right solution here. I am writing some PHP pages that utilize some Javascript. The script works in Mozilla/Netscape, but fails in IE. I don't know if it's the Javascript or the PHP that is causing the problem. I started with an example in a book and added on. Code:
View Replies !
Make The Links Open In A New Window
I am using an iframe to feed an RSS but when i click on the link on the iframe it opens the link on the iframe instead of opening it on the parent window or a new window.. the code is in php. its something like this $item->source = $SERVER_URL; how can i make the links open in a new window or the parent window and not on the iframe.
View Replies !
Multiple Session With Window.open?
I'm writing a admin app that allow the admin to click on a button call "Login As" which invoke window.open("login.php?username=username"); When the new window is opened, the login as part is working, it is logged in as the user as selected but the admin login is terminated in the other window. Any ideas?
View Replies !
Open Window With No Address To Prevent Bookmarking
We've created a secure registration and logon leading to a 3rd party chat popup window. We can't frame the window, it has to be a popup, but we want to hide the address link to prevent bookmarking and unauthorized access. We'd like the steps to be as follows: a) if logon/ authorize are ok b) popup the chat window (3rd party, not an SSL page) c) close the logon/authorize window. Right now, because of the SSL logon, the flow is as follows: 1) we check the logon/ authorize 2) we send authorization information to a php file containing an openwindow javascript ( with <BODY onLoad="openIt();">). 3) the user sees a system challenge saying "You are leaving a secure environment. Do you want to continue?" 4) The user sees another system challenge saying, " The program is trying to close the current window. Would you like to continue." 5) the popup comes up and to prevent bookmarking it has no address bar. This works, but I'm wondering if we can eliminate steps 3 and 4? Is it possible to supress those challenge screens from the server side? Or is there any other way (besides the openwindow JavaScript) to send the user to a new page without allowing them to bookmark the new page. I tried a php header redirect, but I can't find a reference that will allow me to not show the address bar in the new window.
View Replies !
Pop Open A New Window And Show The List Of Emails Being Sent
I have a .php file called newsletter.php it has a form that when submitted it sends an email to all members in the database subscribed to my newsletter. What I'm looking for is someway to either pop open a new window and show the list of emails being sent out while they are being sent and once completed have it echo finished and then the window closes and the newsletter.php page is refreshed to another page
View Replies !
I Have A Form That Needs To Open A New Window - How To Get Around Popup Blockers?
I've put together this Inbound Link Search Form but I'm having some problems getting the results popup to work without getting blocked. Right now I have the <form action="index.php" (itself) and I'm using a variable-laden window.open js snippet to popup the results window but every major browser blocks this popup by default. I tried using target="_blank" but this doesn't work because the variables are not populated until index.php reloads itself, right? What is the most straightforward way to get this around popup blockers? It is important that the form stay open and the selections are remembered so I don't loose my place when using it to search.
View Replies !
Concurrent Session Issues. Currently Our Website Can Have Only One Window Open
I've read some stuff on this but can't seem to come up with a solution that works right. I have a semi-mature (yet very large and robust) internal web application that currently only works with one window open at a time. Maybe I'm abusing the use of $_SESSION but I have data entry processes split up in several steps (which is required since depending on what was put before determines what pages will be shown after). To store this information between the steps I use the session, which is the only way I know that this would be possible (uses arrays in arrays). So if I were to open up a window and start the data entry it would overwrite the last one. Code:
View Replies !
Keeping Window Open After Running Php File From The Command Line?
I was getting a 500 error and someone adviced me to run the php file from the command line to check what errors that would come up with. Great idea which I'd like to use, but when I use the Windows "run" box to do this, I see a window open and close so quickly that there's no way for me to read what's come up. How can I force the window to stay open after the program has finished ? Just in case it's needed, I run the tests on a Win XP machine with Apache.
View Replies !
Open Popup Window When Page Is Loaded If A Field Is Populated
Would it be possible to open a popup window on loading the instruction page but only when the critical information section of the page contains text? The popup window could either contain the contents of the critical information section or just a visual warning that such information exists on the main page. I have a pretty good knowledge of VBA but sadly my knowledge of php and javascript is very limited.
View Replies !
How To Open Random Flash Page Using Hyperlink?
I'm new to using PHP so please bear with me. I'm trying to create a hyperlink that will open a random Flash page so that users will see a different flash module each time. Here is some of the code that I wrote but I'm not sure if it'll work since I'm not very good at coding. Oh yeah, I'm not using a database either. // random_menu.html <head> <?php $i = rand(0,3); ?> </head> <body> <a href = "www.x.com/random.php?i=$i">x</a> </body> --------------------------- // random.php <head> <?php $i = $_post["i"]; if ($i = = 0){ $value = "a"; } else if ($i = = 1){ $value = "b"; } ...etc. </head> <body> <object> <param name="movie" value="$value"> <embed src="$value"></embed> </object> </body> Please help if you know how to do this.
View Replies !
Can't Open A New Fullscreen Popup From Another Popup Window
I can't seem to make a fullscreen popup from a page that is already a fullscreen popup. What I want to do is open another fullscreen popup window from a current fullscreen popup that has the link in it. The link that comes up is http://www.somesite.com/"javascript:void(0);/" Here is a sample of the code I am working with. Does anyone see anything wrong? echo '<html>' echo '<head>' echo '<script type="text/javascript" src="/uploads/File/Javascripts/new_window_max.js"></script>' echo '</head>' echo '<body>' echo '<a href="javascript:void(0);" onclick="fullScreen('/uploads/File',$row['map'],'');">Map</a><br>' echo '</body>' echo '</html>'
View Replies !
Populating Form In Parent Window With Value From Popup Window
I have a text box in the parent window.. now i want to populate this text box with a user_id that i will get from query within a popup window.. How do i get the value from the popup window to be passed to the main window form field in php. I know how it can be done in javascript but when i tried combining javascript and php i dont get the desired result.
View Replies !
Can A Popup Window Return Data To Parent Window?
Is it possible to do the following in php: I want to have a main form open. In the form I want a button that will open a popup window so the user can search for something. The user can then select what they want, and the popup window closes and the main form (which is still open) shows the search results.
View Replies !
Reload Existing Window From Another Window
I have logg in page, after clicking loggin the pop up window apiears and if user loggins it closes, I want to reload if loggin succes ( I have handling sistem for it) ,page were user have clicked to logg in, how do I do it? is it possible to do it with php?
View Replies !
Open On Open / Save Box Dont Work With Download Script
I have a download script. I'm storing files above webroot and using download script for making files available for download to users. Now the problem is that when file download open/save dialogue box comes... if the user clicks on save they can save the file and then they can open it without any problem . But if they click on open then they can't open the file. It says file path not found or there was some error file could not be open.....
View Replies !
SSL Pop Up Window
Does anybody know how can I get rid off the SSL pop up window before I enter in SSL protected page in my site? Navigating other sites with SSL, with the same browser I almost never see it, I can just recognize it by lock sign (hotmail and many other sites).
View Replies !
|