Solved

Append Javascript to URL, SET ZOOM

Posted on 2013-01-02
4
539 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

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Problem to refer to value 8 50
Add box and text color changing for everything 1 26
Jquery keyup 4 20
replace link with jQuery 4 14
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

809 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