Solved

Append Javascript to URL, SET ZOOM

Posted on 2013-01-02
4
536 Views
Last Modified: 2013-01-03
Hello Experts,

 I got url for a web application to use it, how do I add to this url a JavaScript command to set ZOOM to be 120% ?

Thanks
0
Comment
Question by:madmare
  • 2
4 Comments
 
LVL 53

Accepted Solution

by:
COBOLdinosaur earned 250 total points
ID: 38737525
You cannot run a command from the url.  You can pass parameters and the have the application process them off of the onload event if you have control of the code of the target page.  

If you could do it the way you described, it would allow sites to realy screw up others sites off of a link.

Cd&
0
 
LVL 16

Expert Comment

by:HagayMandel
ID: 38738358
This trick (with the help of jQyery) will do it

$(document).ready(function() {
		//alert();
		var url = window.location.href;
		var zoom = url.split("?");
		if((zoom[zoom.length - 1]) == 'zoom120'){
		$("body").css("zoom","120%");
		}		
	});

Open in new window


Just add 'zoom120' to the end of the url
0
 

Author Comment

by:madmare
ID: 38739145
Hello Hagay,

 I don't have any permission to insert code to the url page,

 for example the url is http://www.yahoo.com & I want to add some code to this url to be opened in ZOOM 120%

Thanks
0
 
LVL 16

Assisted Solution

by:HagayMandel
HagayMandel earned 250 total points
ID: 38739192
url by itself is only directive. The referred page (provided that it contains some code in it), can parse it and do thing accordingly.
If you don't have an access to the page content, or you cannot manipulate the link to the url, nothing can't be done.

As said, the page must contain code (as in my previous answer), and the link must be something like:
<a href="www.yahoo.com?zoom120">Yahoo</a>.

Open in new window

0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
This article discusses how to create an extensible mechanism for linked drop downs.
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now