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
How to show html from a js script
Old 09-28-2007, 11:40 AM How to show html from a js script
Skilled Talker

Posts: 53
Trades: 0
hi, everyone know that google using
Code:
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
to display the ads. And the view source actually see nothing of the ads code but jz same like above. Anyone know how to do tht? i tried to search from net but seems like cant get my answer

Thanks for helping
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
mailcol is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 09-29-2007, 12:13 AM Re: How to show html from a js script
coolkbk585's Avatar
Be good this Christmas!

Latest Blog Post:
KBlog has been deativated
Posts: 642
Name: Kyle
Location: Ada, MI
Trades: 0
Javascript is not like a server-side language. The browser runs the JS. Server-side languages run the code and then output regular markup (or JS).

Javascript is executed on the client-side. Since the browser can decipher the JS on its own, it doesn't need to rewrite it as HTML. All that will do is slow up the page loading time. I don't know of any programs that will do that either. What you will need to do it go through the Javascript and see what it outputs...

__________________
<?php if($Adsense_Revenue > 0): define('HAPPINES','100%'); else: define('HAPPINESS', '0%') endif; ?>
coolkbk585 is offline
Reply With Quote
View Public Profile Visit coolkbk585's homepage!
 
Old 09-29-2007, 03:10 PM Re: How to show html from a js script
Extreme Talker

Posts: 160
Trades: 0
Netscape 4 shows the result of document.write when you view source, rather than the JavaScript itself. This will mean that you can see the JavaScript-generated markup, if any.

Although now a legacy browser, Netscape 4 is still available from the following URL :

http://browser.netscape.com/downloads/archive/
ElectricSheep is offline
Reply With Quote
View Public Profile
 
Old 09-29-2007, 03:21 PM Re: How to show html from a js script
tripy's Avatar
Do not try this at home!

Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
Hooo boy, netscape 4...

You know, there is something in any modern browser that is called DOM explorer.
This is what you are looking for.
Typically, google use javascript to create an iframe in your page.

As it's not coming from the source file, you swon't see nothing with "view source", but with the dom explorer, you can see what is the state of the Document Object Model and every elements contained into it at any time.

In firefox, you must install FF and select "custom install" to get it.
But the easier solution, is to install firebug, and on the page you want to examine:
1:
open the firebug console with f12
2:
click the "examine" button
3:
Hover your mouse over what you want to look for, and click on it.The browser won't follow any links, but you will get the normal focus back
Once there, you can see the DOM source in the firebug console, and even modify it (change css value, add new attributes...)
__________________
Only a biker knows why a dog sticks his head out the window.
tripy is offline
Reply With Quote
View Public Profile Visit tripy's homepage!
 
Old 09-30-2007, 03:21 AM Re: How to show html from a js script
Skilled Talker

Posts: 53
Trades: 0
hi all, i get my answer from another forum

Code:
 <script>
<!--
a = 0;
document.write("<scri"+"pt type='text/javascript' src='http://mydomain.com/show_member.js'> </scr"+"ipt");
//-->
</script>
where member.js
Code:
if(a==0){
document.write("True!");
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
mailcol is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to How to show html from a js script
 

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.21276 seconds with 12 queries