Solved

URL to pass image name to a web page

Posted on 2014-09-16
2
163 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:Gary Samuels
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 33

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

SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

773 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