Irishjugg
11-05-2008, 10:59 PM
I have some code from the ajax tabs script from ddrive that I use to dynamically load content into a certain div on my page. When I load content in that div, the new content could contain either forms or links, when they are clicked or submitted, I want to have the results, new pages, or redirected pages (from completed forms) load back into the same exact div they already belong to. The issue I am having is that I cannot make this happen, It looks like I can use ajaxtabs to load them into any other div but the div that is currently in scope.
I am new and pathetic with ajax, mostly because to be honest I haven't taken the time to ACTUALLY learn it, more so I have just been slapping together sample code. I feel like this must be a simple issue to fix, can any of you gurus please give me a hand?
Ill post a bit of sample code here..
The ajax tabs happen as such:
<li class="topbars"><a href="mybuddy.php" rel="inner">My Buddy</a></li>
<li class="topbars"><a href="fshipupdate.php" rel="inner">Friendship Logs</a></li>
into the div called inner, which may have links inside of it. All I want to do is have them show up inside the same div, "inner" but the ajaxtabs script isn't having that.
As a sort of second issue, I have some javascript for one of my forms to validate the fields and blah blah blah before submission, that isn't being run, nor is any other js in ajax loaded content. From an earlier question a user showed me that I need to preload css files for ajax loaded content on the main page or else it wont get pulled in, because of that I grab the .js files I need on my main "welcome.php" page long before I load the new content. No javascript is working for me.
I also tried having the javascript directly in the page that ajax loads, still no go.
Any ideas?
Code:
function validateReport(form) {
alert('started the process');
thats inside script tags and never shows up / happens...
<form onSubmit="javascript:return validateReport(this)" action="funcs/fsupdate.php" method="post" class="fship">
Thats where I call the function in theorey.
Thanks in advance.
I am new and pathetic with ajax, mostly because to be honest I haven't taken the time to ACTUALLY learn it, more so I have just been slapping together sample code. I feel like this must be a simple issue to fix, can any of you gurus please give me a hand?
Ill post a bit of sample code here..
The ajax tabs happen as such:
<li class="topbars"><a href="mybuddy.php" rel="inner">My Buddy</a></li>
<li class="topbars"><a href="fshipupdate.php" rel="inner">Friendship Logs</a></li>
into the div called inner, which may have links inside of it. All I want to do is have them show up inside the same div, "inner" but the ajaxtabs script isn't having that.
As a sort of second issue, I have some javascript for one of my forms to validate the fields and blah blah blah before submission, that isn't being run, nor is any other js in ajax loaded content. From an earlier question a user showed me that I need to preload css files for ajax loaded content on the main page or else it wont get pulled in, because of that I grab the .js files I need on my main "welcome.php" page long before I load the new content. No javascript is working for me.
I also tried having the javascript directly in the page that ajax loads, still no go.
Any ideas?
Code:
function validateReport(form) {
alert('started the process');
thats inside script tags and never shows up / happens...
<form onSubmit="javascript:return validateReport(this)" action="funcs/fsupdate.php" method="post" class="fship">
Thats where I call the function in theorey.
Thanks in advance.