Page view counter

Passing username in a Url Of Links Module

Last post 09-02-2005 6:04 PM by autolibse. 18 replies.

Sort Posts:

  • Re: Passing username in a Url Of Links Module

    09-01-2005, 9:48 AM
    • Loading...
    • DougV
    • Joined on 02-23-2004, 4:27 PM
    • Missouri
    • Posts 618
    • Points 3,090

    Well that's the fun part now since you got everything working.  Just continue to add in javascript
    attributes to your "myjs" string:

    myjs.Append(" window.open('" & s.ToString() & "','','width=400,height=200,status,toolbar=no,menubar=no,location=no')</script>")

     

  • Re: Passing username in a Url Of Links Module

    09-01-2005, 5:46 PM
    • Loading...
    • autolibse
    • Joined on 03-16-2005, 4:36 PM
    • Posts 43
    • Points 205

    Thanks for the code but when I tried it, the screen just flashed and never opened a window. Any idea where the mistake is in the code ( I copied exactly what you had)?

    s.Append("http://localhost/clublean/CourseSelection/DotNetNuke.aspx?name=")

    s.Append(objUser.LastName)

    s.Append("&studentnum=")

    s.Append(objUser.Profile.IM)

    'Now build javascript

    'myjs.Append("<script type = 'text/javascript'>")

    'myjs.Append(" window.open('" & s.ToString() & "')</script>")

    myjs.Append(" window.open('" & s.ToString() & "','','width=400,height=600,status,toolbar=no,menubar=no,location=no')</script>")

    Response.Write(myjs.ToString())

  • Re: Passing username in a Url Of Links Module

    09-02-2005, 10:01 AM
    • Loading...
    • DougV
    • Joined on 02-23-2004, 4:27 PM
    • Missouri
    • Posts 618
    • Points 3,090
    Posting to this forum broke it into two lines instead of one.
    You need it all on one line (or else break it apart more)

    myjs.Append(" window.open('")
    myjs.Append(s.ToString())
    myjs.Append("','','width=400,height=200,status,")
    myjs.Append("toolbar=no,menubar=no,location=no')</script>")

    It will work if you get the syntax typed in correctly.  And make sure
    these '' are Apostrophes not a single double-quote.

  • Smile [:)] Re: Passing username in a Url Of Links Module

    09-02-2005, 6:04 PM
    • Loading...
    • autolibse
    • Joined on 03-16-2005, 4:36 PM
    • Posts 43
    • Points 205
    It now works, thanks. Now a new issue when the window opens I have Gridview on the form which contains a hyperlink:

    <asp:HyperLinkField DataNavigateUrlFields="coursenum" HeaderText="Description" NavigateUrl="~/Descript.aspx" DataNavigateUrlFormatString="descript.aspx?coursenum={0}" Text="Description" Target="_blank" />

    which opens a course description file in a new window. Is there any way to have the new window have no tool bar and menus like the window you created. Where would I put the javascript ?

Page 2 of 2 (19 items) < Previous 1 2