Solved

URL to pass image name to a web page

Posted on 2014-09-16
2
159 Views
Last Modified: 2014-09-16
I know we can open an image in a browser: http://www.mysite.com/imagename.jpg

I need to add some style(size) to the image. I'm thinking that if I could pass the name of the jpg in the url I could create a webpage containing the style. For example something like: http://www.mysite.com/imagewrapper.html?imagename.jpg

In the imagewrapper.html page I would need to collect the imagename , add some style to it like style="width:250px;"

The idea is that no matter what the original size of the image or the size of the browser window is the image will always display with a width of 250 pixels.

Any suggestions?
0
Comment
Question by:garysamuels
2 Comments
 
LVL 53

Assisted Solution

by:COBOLdinosaur
COBOLdinosaur earned 250 total points
ID: 40325789
I am not at all sure I understand what you are trying to do. If you want am image to render at a specific size you simply apply the style in the page where it resides.

Cd&
0
 
LVL 32

Accepted Solution

by:
Big Monty earned 250 total points
ID: 40325804
I think you're better off displaying the image in a modal dialog box rather than a brand new page. jquery offers several options, I particularly like LightView the best as it's easy to customize and the docs are pretty decent. ColorBox is also a good option for a simpler approach
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The viewer will learn the basics of jQuery, including how to invoke it on a web page. 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.: (CODE)
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

914 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

19 Experts available now in Live!

Get 1:1 Help Now