Regarding html syntax

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rkyakkala
    New Member
    • Oct 2010
    • 11

    Regarding html syntax

    Hi,

    i am passing arguments to a new window in the below manner:

    Code:
    <input type="submit" name="submit" value="click" onclick = "window.open('<c:url value='/viewMapToolScreen.html?com.smarts.autoAttachDM=10.80.159.20:7001/SAM-GSAM1&class=com.smarts.webapps.SmWebMapApp&com.smarts.launch.class=<\%=request.getParameter(\'classname\')%\>&com.smarts.launch.instance=SESSION-APP-InChargeService_SAM-T1-bay->APP-InChargeService_IP-Perspective&com.smarts.map.showAllBusiness=1&com.smarts.userid=admin&com.smarts.password=changeme'></c:url>')"/>
    i am getting problem when i am passing argument value as
    Code:
    <\%=request.getParameter(\'classname\')%\>
    i am getting javascript error as Excpected ')'.
    i checked everything is fine.i hope i can get solution for this.thanks in advance.
    regards,
    rama
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    How does this appear in your browser (view source)?

    Comment

    • rkyakkala
      New Member
      • Oct 2010
      • 11

      #3
      Hi,
      Following is my code from my browser(view source).i think it may help you.
      Code:
      <input type="submit" name="submit" value="click" onclick = "window.open('/Dashboard/viewMapToolScreen.html?com.smarts.autoAttachDM=10.80.159.20:7001/SAM-GSAM1&class=com.smarts.webapps.SmWebMapApp&com.smarts.launch.class=<\%=request.getParameter('classname')%>&com.smarts.launch.instance=SESSION-APP-InChargeService_SAM-T1-bay->APP-InChargeService_IP-Perspective&com.smarts.map.showAllBusiness=1&com.smarts.userid=admin&com.smarts.password=changeme')"/>
      i am getting problem when i passing argument as follows(view source syntax)
      Code:
      <\%=request.getParameter('classname')%>

      Comment

      • acoder
        Recognized Expert MVP
        • Nov 2006
        • 16032

        #4
        That's because of the single quote.

        There seems to be a problem with your server-side code.
        Code:
        <\%=request.getParameter('classname')%>
        should not be appearing on the client-side. Check your syntax.

        Comment

        • rkyakkala
          New Member
          • Oct 2010
          • 11

          #5
          Hi,

          Thanks for your suggestions.
          Now that syntax problem has been cleared.

          Regards,
          Rama

          Comment

          Working...