Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript
|
Javascript General Javascript discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 23rd, 2010, 07:57 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

All you need is something like this in a page like Default.aspx:

Code:
 
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
  Response.Clear()
  Response.ContentType = "text/x-javascript"
  Response.Write("document.write('<h2>Test</h2>');")
  Response.End()
End Sub
Then you can reference the page like this:

Code:
 
<script src="Default.aspx" type="text/javascript"></script>
And it will output a heading at level 2 at that precise location.

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
The Following User Says Thank You to Imar For This Useful Post:
msman88 (March 23rd, 2010)
 
Old March 23rd, 2010, 10:29 AM
Authorized User
 
Join Date: Feb 2008
Posts: 89
Thanks: 13
Thanked 0 Times in 0 Posts
Default

Thanks Imar, It's a good work and actually accomplished my purpose.
Now I'll continue need other things, such that :
1) If a publisher made intensive clicks using robots or his friend recommendations. Guide me to make the system detect this thing.
Then our administrators will disable his account.
__________________
ASP.NET & C#

Last edited by msman88; March 23rd, 2010 at 01:01 PM..
 
Old March 23rd, 2010, 12:29 PM
Authorized User
 
Join Date: Mar 2010
Posts: 27
Thanks: 2
Thanked 1 Time in 1 Post
Smile

good topic
The Following User Says Thank You to msomar For This Useful Post:
msman88 (March 23rd, 2010)
 
Old March 23rd, 2010, 01:03 PM
Authorized User
 
Join Date: Feb 2008
Posts: 89
Thanks: 13
Thanked 0 Times in 0 Posts
Default

I edited the last thread above.
__________________
ASP.NET & C#
 
Old March 23rd, 2010, 03:41 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Quote:
Guide me to make the system detect this thing
Sorry, I can't do that. It's like asking: "Somebody asked me to build a nuclear power plant, but I don't know where to start. Can you guide me to building one"?

This is way too much to ask for on a public forum. It's not an easy thing to do and requires skills in many different areas including networking, databases, .NET coding, client script and more. It also requires you think about business rules such as those that define "friends" and robots and a whole lot more. Those are topics not easily explained over a forum post.....

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old March 24th, 2010, 06:57 AM
Authorized User
 
Join Date: Feb 2008
Posts: 89
Thanks: 13
Thanked 0 Times in 0 Posts
Default

But I have to fix at least some of this problem in my project. I don't want to feel that I reached to a closed door. I don't want to feel despaired because of this problem.
I know it's difficult, but I don't like say that, any problem have a solution, I hope I can solve even a apart of it, or solve it in about 60% success. And we all will benefit for when search for new knowledge. I'm ready to explain more.
Thanks Wrox Developers,

We can shifit discussing in this thread:
how adsense report invalid clicks
__________________
ASP.NET & C#

Last edited by msman88; March 24th, 2010 at 07:00 AM..





Similar Threads
Thread Thread Starter Forum Replies Last Post
Hiding meta-tags in aspx page reach_reema ASP.NET 2.0 Basics 0 September 10th, 2008 01:49 AM
html(aspx) web page sivkum Javascript 1 January 11th, 2007 01:53 AM
convert Html in aspx page prashantraizada2002 ASP.NET 1.0 and 1.1 Basics 1 June 24th, 2006 04:55 PM
Add XSLT transformed XML (html) on an aspx page humour XSLT 2 September 30th, 2004 05:13 AM
Cookie Error when run web page test.aspx C#.net minhpx General .NET 1 August 10th, 2004 01:23 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.