473,386 Members | 1,943 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

JavaScript on .bat file

Hello, I'm trying to build a file, that will Pops up automatically ad's on some web site;

this is what im trying to do
Expand|Select|Wrap|Line Numbers
  1. start "~\chrome.exe" javascript:location.href='/MyYad2/MyOrder/CartradeDetails.php?CarID=720724&Up=u
The problem it does not work, would love if someone would help me Thanks in advance. :)
Mar 24 '12 #1

✓ answered by Claus Mygind

You are going about it the wrong way.

First as stated by others here already, you need to post your question in the javaScript forum instead of here in the Java forum.

Second you would not use a .bat file to pop up an ad. You would build in your code an ajax call that will make a call back to the web server after the HTML page has loaded on the user's computer.

I suppose if you wanted to track the user's interest to determine what kind of ad to display on their computer, you may have to use cookies, to see what other sites they have visited. But at this time that seems above your skill level.

So in the <body> tag add "onload = yourAdCall()". Then either in your javaScript section of the HTML header or in the linked .js file create your ajax call, which will return your ad to the user.

5 2693
r035198x
13,262 8TB
If you want to launch a browser window then use the Desktop class: http://docs.oracle.com/javase/6/docs...ava.net.URI%29
Mar 24 '12 #2
what should i do ? :?
Mar 24 '12 #3
r035198x
13,262 8TB
Are you working in Java (this is a Java forum)?
Mar 24 '12 #4
im not working in java but be happy if you will help me
Mar 24 '12 #5
Claus Mygind
571 512MB
You are going about it the wrong way.

First as stated by others here already, you need to post your question in the javaScript forum instead of here in the Java forum.

Second you would not use a .bat file to pop up an ad. You would build in your code an ajax call that will make a call back to the web server after the HTML page has loaded on the user's computer.

I suppose if you wanted to track the user's interest to determine what kind of ad to display on their computer, you may have to use cookies, to see what other sites they have visited. But at this time that seems above your skill level.

So in the <body> tag add "onload = yourAdCall()". Then either in your javaScript section of the HTML header or in the linked .js file create your ajax call, which will return your ad to the user.
Mar 24 '12 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Antonio | last post by:
Good Morning, I would want to insert the javascript of google adsense in my site, here it is : <script type="text/javascript"><!-- google_ad_client = "pub-4902392511135327"; google_ad_width =...
21
by: ryanmhuc | last post by:
I know the subject might be confusing. I am no beginner with javascript but I haven't been able to figure out how to get the javascript file name from code inside the file. So you have an HTML...
7
by: moondaddy | last post by:
I want to dynamically create a JavaScript file and cache it on the client for re-use. I know how to write javascript to a web page from the code behind, but I don't know how to actually create a...
3
by: Angel | last post by:
Is there any way to debug a javascript file that I included in my ASP.net project. or some reason when I call a javascript function in the file from my ASP.NET code I get an error message. now if i...
24
by: gizoto316 | last post by:
I was wondering if it was possible to have php code in a javascript file. I have a java file with a bunch of functions on it and I wanted to add one where the action has php code in it. When i...
2
by: verci | last post by:
Hi guys, sorry if this seems stupid but I'm a newbie, I'm running Windows XP Pro SP2, IE 7, VS2005, ASP.net 2.0 The problem is that I'm trying to display this news scroller made in a Javascript...
17
by: NeoAlchemy | last post by:
I am starting to find more web pages that are using a query parameters after the JavaScript file. Example can be found at www.opensourcefood.com. Within the source you'll see: <script...
9
by: Mahernoz | last post by:
Hello Friends, The JavaScript File exmplmenu_var.js contains the code... (for the sake of brevity i am showing only that code which needs to be changed) I am actually developing a menu using...
1
by: runway27 | last post by:
i have a register.php and confirmregister.php file. in the first file the user fills a registeration form and in the second page they can review what they entered in the first page and then...
2
by: Matthew Wells | last post by:
Hello. I thought this was supposed to be simple. I'm trying to use a .js file for my javascript functions. I'm testing by only using one function The function works when it's at the top of...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.