Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
Hide, load, and show div with jquery/js
Old 11-26-2010, 02:20 AM Hide, load, and show div with jquery/js
Average Talker

Posts: 24
Trades: 0
Here the complete code:

I have a few pages from each other to interact with page with id load, as below:

inside of page process.html as follows

PHP Code:
    <form action="<?php echo $send?>" method="post" id="choose">//data send to process.php and redirect back to ?p=process (process.html page)
    <!--some options here -->
    <a onclick="$('#choose').submit();" class="button"> <span> <?php echo $button_next;?> </span></a>
    </form>
    
    <?php //if ($this->options->hasChosed()) { ?>
    <div id="guest_details"> </div>
    <?php //} ?>
    
    <?php if (isset($this->session->data['guest'])) { ?>
    <div id="first_start"> </div>
    <?php ?>
    
    <script type="text/javascript">
    <!--
    $('#guest_details').load('?p=guest_details');
    $('#first_start').load('?p=first_start');
    $('#guest_details').hide('slow');
    $('#first_start').show('slow');
    -->
    </Script>
inside of page guest_details.html as follows
PHP Code:
<form action="<?php echo $send?>" method="POST" id="guest">//data send to guest_details.php and redirect back to ?p=process (process.html page)
    <!-- Some cell here -->
    <a onclick="$('#guest').submit();" class="button" id="first_start"> <span> <?php echo $button_next;?> </span></a>
    </Form>
inside of page first_start.html as follows
PHP Code:
<form action="<?php echo $send?>" method="POST" id="_start">/data send to first_start.php and redirect back to ?p=process (process.html page)
    <!-- Some cell here -->
    <a href="<?php echo str_replace($edit_guest_details); ?>" class="button"> <span> <?php echo $edit_guest;?> </span></a>
    <a onclick="$('#_start').submit();" class="button" id="f_start"> <span> <?php echo $button_next;?> </span></a>
    </Form>
situations:

page guest_details.html and first_start.html load inside process.html with using

Code:
load('?p=guest_details')
and
Code:
 load('?p=first_start')
by default guest_details.html is showing and first_start.html is hiding

Goals:
when guest_details.html form submited by click
PHP Code:
<a onclick="$('#guest').submit();" class="button" id="first_start"> <span> <?php echo $button_next;?> </span></a>
then hide the page guest_details.html and show first_start.html

now at first_start.htm page

guest_details.html should be hide even so page refresh(f5), but

when button
PHP Code:
<a href="<?php echo $edit_guest_details?>" class="button"> <span> <?php echo $edit_guest;?> </span></a>
clicked then guest_details.html show again

Looking for some pointers, Thanks in Advance

Last edited by jones; 11-26-2010 at 02:27 AM..
jones is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 11-26-2010, 07:09 AM Re: Hide, load, and show div with jquery/js
CSM
CSM's Avatar
Front-End Developer

Posts: 297
Name: Michael Pehl
Location: Palma de Mallorca
Trades: 0
Is it not enough that you ask in one forum?
__________________
Chief Web Officer / Front-End Developer / System Engineer

Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
CSM is offline
Reply With Quote
View Public Profile Visit CSM's homepage!
 
Reply     « Reply to Hide, load, and show div with jquery/js
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.23663 seconds with 12 queries