Solved

Append Javascript to URL, SET ZOOM

Posted on 2013-01-02
4
544 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
Find out what you should include to make the best professional email signature for your organization.
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

717 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