Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 2 of 2

Thread: Calling a topic in a small window

  1. #1
    Richnyc30 is offline Senior Member
    Join Date
    Mar 2009
    Posts
    340

    Default Calling a topic in a small window

    How would I go from my link in the product description to the called topic in a smaller pop-up window?
    I've looked through my Javascript books and didn't see how to call a small window with a link.
    Any idea how to close the small window with the Topic and return to the calling window? Javascript in the Topic?
    Richard

  2. #2
    GoVedia is offline Member
    Join Date
    Oct 2012
    Location
    Orange, CA
    Posts
    98

    Default Javascript Popup With Topic

    window.open() in conjunction with popup.aspx (included with ASPDNSF) can accomplish what you are after.

    Example Implementation
    The following link will open a popup window, containing the content of the "shipping" topic.
    HTML Code:
    <a href="javascript:void(0);" onclick="topicpopup('Shipping+Information','shipping',650,550,'yes')">Shipping Information</a>
    As you can see, clicking the anchor tag will call a function called "topicpopup" with 5 parameters. Here is how to define each parameter, with respect to the order they are called:
    1) Title of the pop up window. In this example, we use 'Shipping+Information'.
    2) Name of the topic we are pulling content from.
    3) Desired width of the popup window in pixels.
    4) desired height in pixels.
    5) Whether or not to include scrollbars.

    Here is the function we are calling (make sure to include it):
    Code:
    function topicpopup(title,topic,w,h,scrollbars)
    {
      window.open('popup.aspx?title=' + title + '&topic=' + topic,'popup','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=' + scrollbars + ',resizable=no,copyhistory=no,width=' + w + ',height=' + h + ',left=0,top=0');
      return (true);
    }
    Hope that helps!
    Robert Kanaan
    AspDotNetStorefront Development Partner
    robert@GoVedia.com
    408-758-8845

    GoVedia
    http://GoVedia.com
    Approved AspDotNetStorefront Development Partner
    AspDotNetStorefront Recommended Reseller