Jump to content

Complicated problem


xcandiottix

Recommended Posts

I have a javascript page included with in a div on a second page. The 1 page has this code:

<html>
<script type="text/JavaScript">
<!--
document.write("Hello World!")
//-->
</script>
</html>

 

If i navigate directly to the first page i get "Hello world" but if i navigate to the page with the div the includes the first page I get nothing. Does the div preclude the script from running? On the second page, if i view source I don't see the above js code. Is there a way to make it work?

 

Link to comment
Share on other sites

Well here's where it gets complicated. On the first page i have:

<html>
<script type="text/JavaScript">
<!--
document.write("Hello World!")
//-->
</script>
</html>
<?php echo "Goodbye World";?>

 

Again, navigating directly to the first page gets both printed on screen.

 

But if I navigate to the second page I get:

 

Goodbye World.

 

I don't understand how it can run the php, html, and css that are actually on the first page but not the js.

 

 

 

On the second page, here's the part of the page that gets the first page's address from the xml file

 

		else{
			var element = document.getElementById("app1");
			req.open('GET', application1, false);
    			req.send(null);
    			element.innerHTML = req.responseText;
		}

 

and here's how page one is brought up on the second page

 

document.write("<td width='33%' class='LEFTappcell' align='center' valign='top'><div id='tit1'></div><br><div id='app1'></div></td>");

 

Link to comment
Share on other sites

Well, i think you post made good points and honestly I was so focused on the individual pages tat I lost sight of where all the includes were landing. Here's the source code from the browser. Strangely in Chrome, where ever there's javascript it's in plain text .... not color coded like the HTML, CSS, etc. Is it possible that:

<script type="text/javascript"> 

Is wrong?

 

The page loads like so:

 

http://www.appdilly.com/member/user_page.php

-Includes in order:

-/Appdilly-Logo-and-Banner-User-UP.html (an html banner with js mouse over)

-/css_eval.php (dynamically generated css)

-/evaluator.php (this is where the problem is)

--Requests data from Kcandiotti400.xml

--Kcandiotti400.xml has an element with the address for --"/applications/appfiles/3.php?u=Kcandiotti400"

--/3.php (evaluator includes this page with in one of evalulator's DIV tags)

--3.php includes index.php, index.php's JS does not display.

-/Mlowernavbar.html (html nav bar)

-/copyright.html (copyright info)

 

I've attached the source for

userpage.php

evalulator.php

3.php

index.php

 

And links to the corresponding live pages:

http://www.appdilly.com/member/user_page.php?u=Kcandiotti400

http://appdilly.com/applications/appfiles/3.php

http://appdilly.com/applications/includes/3/index.php

 

As you can see the JS works on the last two but not when the entire package is included on the main page.

 

Thanks so much!

 

[attachment deleted by admin]

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.