Main
Index
Search
Posts
Who's
Online
Log
In

Home: Discontinued/Classic Products: Page Publisher:
Pop up pictures - problems

 

 


AAA
New User

Mar 11, 2005, 7:11 AM

Post #1 of 4 (3870 views)
Shortcut
Pop up pictures - problems Can't Post

I've got a webpage with the following html tag in it:


Code
<a href="pics/114_1420.jpg" target="_blank" onClick="viewPic(this.href); return false"> 
<img src="buttons/icon_photo.gif" width="25" height="20" border="0" align="top" alt="Click to see photo!"></a>


This appears as a small pic of a camera (icon_photo.gif) which when clicked on cause a window to pop up with the image, in this case 114_1420.jpg.

I need a way of adding in PML tags so that the user can change the image loaded. This ones got me scratching my head because of the Java at the end of the href tag. Any ideas?

Thanks

Mike


MikeB
Staff / Moderator


Mar 12, 2005, 3:21 PM

Post #2 of 4 (3844 views)
Shortcut
Re: [AAA] Pop up pictures - problems [In reply to] Can't Post

Hi Mike,

Thanks for the post! Smile

While I'm not exactly sure how you were hoping to set this up for your users you should actually be able to use a default <a href> tag that Page Publisher will recognize. For example you could have something like this in your code:


Code
<!-- publish type="link" name="Image"--> 
<a href="" target="_blank" onClick="viewPic(this.href); return false">
<img src="buttons/icon_photo.gif" width="25" height="20" border="0" align="top" alt="Click to see photo!">
</a>
<!-- /publish -->


You'll notice that rather than putting an opening and closing Publish tag I added the code for my link inside this. Now if a user was to log in to Page Publisher they would be able to specify the name of the image to open.

Because of the way Page Publisher is set up, it will replace the <a href=""> with the correct URL but it won't remove the rest of the link tag (target, onClick, etc). This means that if a user enters "/pics/1234.jpg" the published code would look like this:


Code
<a href="pics/1234.jpg" target="_blank" onClick="viewPic(this.href); return false">  
<img src="buttons/icon_photo.gif" width="25" height="20" border="0" align="top" alt="Click to see photo!"></a>


You'll notice that the link portion was changed but the target and onClick values weren't overwritten. I'd suggest giving this a try and see how it works out for you.

If you have any other questions feel free to let me know! Smile

Cheers,
Mike Briggs - Product Specialist
support@interactivetools.com

[hr][i][url "http://www.interactivetools.com/consulting/"][b]Hire me![/b][/url]
Save time by getting our experts to help with your project. Template changes, advanced features, full integration, whatever you need. Whether you need one hour or fifty, get it done fast with [url "http://www.interactivetools.com/consulting/"][b]Priority Consulting[/b][/url].[/i]


AAA
New User

Mar 13, 2005, 4:17 AM

Post #3 of 4 (3836 views)
Shortcut
Re: [MikeB] Pop up pictures - problems [In reply to] Can't Post

Mike,

thanks for the fast reply, already tried that, but the user has to type in the pic address, it doesn't allow them to select the pics from a list or upload and delete them. I need to be able to use something like this.

Problem is this creates a whole heap of gibberish when you go back into "Update" - next to the "Link Text" box. When saved, this messes up the popup java.





Any other ideas?

thanks

Mike


Code
 <!-- publish type="file_select" name="Image" allowupload="yes" allowadd="yes" allowremove="yes"--><a href="http://www.xxxx.com/pics/114_1234.jpg" target="_blank" onClick="viewPic(this.href); return false"><img src="buttons/icon_photo.gif" width="25" height="20" border="0" align="top" alt="Click to see photo!"></a><!-- /publish --> 



ross
Staff / Moderator


Mar 14, 2005, 2:12 PM

Post #4 of 4 (3818 views)
Shortcut
Re: [AAA] Pop up pictures - problems [In reply to] Can't Post

Hi aaa.

Thanks for the follow-up!

Unfortunatly I think you may be looking a little beyond Page Publisher’s capabilities. Page Publisher is setup to handle quite a few different attributes within an html tag, however, JavaScript isn’t the easiest for it to handle.

What you could try is setting up a dummy page that just has an image uploader on it that your users can upload all the images that get loaded into the popup window.

Then, on the actual pages, you could have another image uploader that the users could use to upload the thumbnail images. On this one though, you could have it so that the image is also a link. If you have all the images uploaded to the same folder, the user would just have to enter “image1large.gif” into this field.

Does that sound like it would help? Just let me know and I can go into more detail for you Smile.
-----------------------------------------------------------
Cheers,
Ross Fairbairn - Product Specialist
support@interactivetools.com

Hire me!  Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/