Hi frnds...

I have some doubts regarding this PHP...

1)i need to display an add in between two pages.....i.e. when i post data from 1st page to 2nd page than, i want to display an add before redirecting the 2nd page...by using PHP or JavaScript...

2)Can we pass input value by using Javascript Sessions...

3)Can we write php variables in Java script.....


Plz reply asap...if any possiblities give me a suggetions how i can do.......

Well it isn't elegant but one way is to first direct the user to the ad page, then in the meta refresh section of the ad page, put in the number of seconds you want the user to stay on the ad page until they are redirected to the second page.

An alternative would be to use a javascript function that on submit shows the ad on the form page (in some kind of overlay possibly) and then after a certain period of time continues the form submission

You sure you want to do this? I'd bail out on principle if confronted by something like that. Can't you put an ad somewhere "normal"?

Well it isn't elegant but one way is to first direct the user to the ad page, then in the meta refresh section of the ad page, put in the number of seconds you want the user to stay on the ad page until they are redirected to the second page.

Hi khess..

Thanks 4 ur reply...Yah, Surely u r very good...but, I have another doubt here.when we direct to the add page, here i need to post data...if i post data to the add page, than again i need to post data from add page to my next page..is it secure?

Eg:

when we enter our credentials in login page,after submitting form to add page, than i need to get all variables in add page. here is the problem which i phase,...


thanks...

This advertisement is completely unfriendly.
however if you must,
if the top of the interstitial advertising page includes one of those progress bars stating 'Processing your form please wait' (even a fake), you can pretty much put whatever you want on the lower 90% of the page, for ~10 seconds before people get offended

Answers to other questions:
2. Javascript sessions? They don't exist (or it would be a horrible shock if i discovered they do!)
3. Yep! Something like this:

$script = <<<END
<script type="text/javascript">
var myJavascriptVar = $myPhpVar
</script>
END;
print($script);

But be careful: it simply prints the variable $myPhpVar when downloading the page, it wont treat them as the same variable ($myPhpVar never existed, for all your browser knows).

This article has been dead for over six months. Start a new discussion instead.