Jump to content

open php file inside the <div> tag?


sayedsohail

Recommended Posts

Hi everyone,

 

In my main.php file, I have got two tabs and i wish to open the related files i.e, details.php when i click the details tab and notes.php when i click the notes tab.  Unfortunately when i click any of the tabs the file taking up the entire space of the window.  I want keep the tabs and display the file below the tabs menu.   I knew i can achieve this using iframe, but is there any way i can achieve the same using div elements.

 

 

main.php

<?
echo "<html><head><title>Main</title></head>";
echo "<li><a href='details.php' onclick=\"show('sub1'); return(false);\">  <span >Details</span></a>
</li><li><a   href='notes.php' onclick=\"show('sub2'); return (false);\">  <span>Notes</span></a></li>
</ul>";

echo "<div id='sub1'></div><div id='sub2'></div></html>";


?>

 

 

 

Link to comment
Share on other sites

1. you can use ajax to load the details or note pages into the div/span tag.

 

2. use a form, so that when the user clicks a tab, the page refreshes and you can then see which variable isset and load the corresponding page into the div/span tag

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.