Solved

URL to pass image name to a web page

Posted on 2014-09-16
2
167 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

The New “Normal” in Modern Enterprise Operations

DevOps for the modern enterprise offers many benefits — increased agility, productivity, and more, but digital transformation isn’t easy, especially if you’re not addressing the right issues. Register for the webinar to dive into the “new normal” for enterprise modern ops.

Question has a verified solution.

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

Suggested Solutions

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.
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
In this tutorial viewers will learn how to style rounded corners for elements in CSS using the border-radius property Begin with a normal styled element such as a div: To style all four corners of the div to be the same degree of roundness, use the …
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