FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » activating a JS script from PHP redirect
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: activating a JS script from PHP redirect [message #184169 is a reply to message #184167] Wed, 11 December 2013 01:15 Go to previous messageGo to previous message
Scott Johnson is currently offline  Scott Johnson
Messages: 196
Registered: January 2012
Karma:
Senior Member
On 12/10/2013 2:20 AM, Jerry Stuckle wrote:
> On 12/9/2013 10:36 PM, Scott Johnson wrote:
>> OK I will try to make this make sense.
>>
>> I have an html page with JS that displays a DIV block after a link on
>> that page is clicked.
>>
>> The JS is looking for
>>
>> Attributes from an <anchor> link:
>>
>> rel='aaa'
>> href='bbb'
>> class='ccc'
>>
>> to open the DIV.
>>
>> Is there a way to call this html page from a different PHP page script
>> that will cause the html to behave as if its anchor was clicked?
>>
>> Thanks
>> Scotty
>
> Scotty,
>
> What do you mean by "call this html page from a different PHP page"? Do
> you mean including the script in another page, loading the page with
> header('Location: xxx') or something else?
>
>

Currently there is only one page involved.

Lets say auto.html

On this page there is a quote link that calls a JS function on the page
looking at the class, id and rel from the link, that then displays a
currently hidden div that has the actual quote form on it.

Additionally there are 2 other pages.

An index.html page that has a quick quote form with a dropdown to select
quote category (such as auto, home etc..) which when clicked calls a
quote.php page which sends out an email to the agent.

What they would like to do is combine the quick quote on the index.html
page to redirect to the category page, auto.html and display the quote
form in one fell swoop.

I have created a solution and have the quote.php look at the post from
the index.html form and then using header to redirect to the auto.html
with a loaded url with query parameters.

Since the original JS does not look at the url I just created a new js
that parses it. I hate having 2 scripts do the same thing due to
different modes of giving it parameters.

I suppose however that this is just the way it may have to be.

Scotty
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: recognize country
Next Topic: Open Portal - web portal software
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Nov 22 19:35:31 GMT 2024

Total time taken to generate the page: 0.04036 seconds