Jump to content

[SOLVED] No calling a script within a script?


cozbaldwin

Recommended Posts

Hi there, fine people.

 

I am proficient in html & css, but lack a lot of knowledge in the programming languages.

 

I'm developing a site which should have dynamic content filling the sidebars.  I found an ajax script that when I created a DIV and named it  (for example...) "div1", it would call to fill in that DIV with content from a separate php page.  Simple... but advanced work for me.

 

Anyhow -- it's working fine -- everything shows up.... except for one thing.  On that remote php page I have another script to call on (for example...) FeedBurner to display a feed, but it doesn't show up on the parent PHP page.  What gives?  Is calling a script within a script not able to be done?  Or do you think that ajax script I have not coded properly? 

 

Here's all the code:

 

In the head of parent page, I'm calling these two files:

<script type="text/javascript" src="http://www.hiddeninthesand.com/js/ajax.js"></script>
<script type="text/javascript" src="http://www.hiddeninthesand.com/js/ajax-dynamic-content.js"></script>

But you can view them here in text:

http://www.hiddeninthesand.com/js/ajax.txt

http://www.hiddeninthesand.com/js/ajax-dynamic-content.txt

 

Now, like I said.. it all works except when I go to call this additional script, which happens to be Feedburner, to aggregate a feed into my remote page.

<script src="http://feeds.feedburner.com/hitslatestfaqs?format=sigpro" type="text/javascript">

Works all by iteself on the parent page, but when i place it on the remote page being called as dynamic content.... it completely fails to show anything.

 

So I'm wondering if anyone knows why this cannot happen.  Thanks!

 

Link to comment
Share on other sites

So, the first two files are on page 1, and then the second quote is on page 2?

 

Javascript is not parsed when it's retrieved by AJAX, so you'll either need to make it be parsed, or find a different way to do things....  (Look into Javascript eval() maybe)

Link to comment
Share on other sites

Javascript is not parsed when it's retrieved by AJAX
This is basically what I was looking for but I couldn't seem to find this statement ever said in the places I was looking around in the web, so thanks.  Now that I know that, I'll look into other methods including what you mentioned (which I've no knowledge on whatsoever, but at least now I know where to start looking).

 

Thanks again.

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.