Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    PHP


SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





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:
Open New Window
I have this code, i have tried for ages, I'm hopless, how can i ,make this link open in a new window? Code:

View Replies !
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 !
Don't Open New Window
Is there the possibility of not permiting the user of opening two windows of the same web site? Code:

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 New Window With PHP Header
Is there any way to open a new browser window with PHP? I know it can be done in javascript - but wondering whether it can be done with PHP. Much oblidged for any comment.

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=&#391;'){
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 !
Need Script To Open The Browse Window?
I want a script for php-mysql to backup the mysql data and restore, how i can write to open a browse window to select the desitanion directory to backup data there?

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 !
How I Can Open The Linked Doc File In The Same Window
i'm using php/mysql and want to open the attached doc file in the same
window. any one can help how can i code it?

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 !
Open Window On Button Click
in a form, here's what I want to do :

<input type=button onclick= (???)

is it possible to open a pop-up window with a specified url without
using javascript ?

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 !
When I Open A Second Browser Window From The First (IE6), It Uses The Same Session With First.
I see this: When I open a second browser window from the first (IE6), it uses the same session with first.

It have much fan to select "language1" (from "language2") in one window and in the next click second window be automatic "language1". But I want to eliminate this nasty effect.
How?

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 !
Use PHP To Open A New Browser Window And Then Write To It?
I'm trying to find out if there is a way to use PHP to open a new browser window and then write to it? Kinda like when you click on a link that runs a javascript to open and write to a new window so the link shows up in a new window, but not the simple 'target=_blank' of the <a> tag.

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 !
Open Dynamic Image Link To Certian Sized Window
I want to be able to open the pop-up images in a browser window sized the same size as the image. Could I add something in the header info? Code:

View Replies !
Page To Open In The Webshops Main Frame Instead Of Opening In A New Window.
When the user register himself for a newsletter at my webshop the webshop sends out an email with an activationkey. When the user clicks the activationkey in the email I want the page to open in the webshops main frame instead of opening in a new window. Is this possible?

View Replies !
Window.open Not Working From Inside User Defined Function
I'm trying to use window.open from inside a user defined function, and it's not working. Code:

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 !
Make A Popup Window That When I Click On A Picture It Pops Up A New Window
I am trying to make a popup window that when I click on a picture it pops up a new window with the bigger picture in it. Code:

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 !
Popup Window That Darkens The Window That Opened It
I just visited a website and saw how they darkened the background page
when a popup was opened. How can I do this using JS and HTML? Is it a
normal popup window?

View Replies !
Way I Can Stop The 'message Sent' Window Opening In Another Window?
everytime somebody sends a message from my contact form on my flash website, an additional window opens saying 'message sent', its not a big problem, its just annoying. Is there any code i could add to the contact.php form to prevent this from happening?

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 !
How Many Connections Are Open And On What Pages They Are Open.
I know why I am getting this message. Is there any code I can write up to find how many connections are open and on what pages they are open.

View Replies !
Pass A Function As Array(&$sess_handler, 'open') Instead Of '$sess_handler->open'
In the function session_set_save_handler I can pass the name of function which deal with session. In Xoops code I see the use of this function like that: Code:

View Replies !
Random Number - Find A Random Number But Keep Getting Zero?
i am trying to find a random number but keep getting zero here is the code i am using.
PHP Code:

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 !

Copyright © 2005-08 www.BigResource.com, All rights reserved