Web Analytics Made Easy -
StatCounter adding to java payload - CodingForum


No announcement yet.

adding to java payload

  • Filter
  • Time
  • Show
Clear All
new posts

  • adding to java payload

    Hi guys,
    This is my first time here.
    I am new to code and im trying to get a website to work using a javascript app that is hosted else where.

    here is the script
     <script language="javascript"type="text/javascript"src="http://apps.shoraipower.com/selector/js/shorai.js"> </script>
    <script language="javascript"type="text/javascript">
    	function loadSelected(payload)
    	document.location.href = "http://"mysite"" + payload;
    <iframe src="http://apps.shoraipower.com/selector/embed.aspx?url=http://www.yoursite.com/path/"width="690"height="1500"scrolling="auto"frameborder="0"></iframe>
    at the moment the Payload i get is the name of a product. so i get www.mysite.com/product

    i want to be able to force it to give .html after the payload

    i can name my page the same as the payload but without the file extension i just get a page full of code.
    if that makes sense at all does anyone have any clues

    i tried adding +".hmtl" after the payload

  • #2
    First, in the line document.location.href = "http://"mysite"" + payload; I see redundant quotes there. It should probably read document.location.href = 'http://example.com'+payload;.

    And then are you saying document.location.href = 'http://example.com'+payload+'.html'; doesn’t work? What’s happening? Can you show us the live example?

    And by the way: remove the language="javascript" from your HTML, that’s deprecated.
    Stop solving problems you don’t yet have!


    • #3
      using the following document.location.href = "http://www.example.com/" + payload;

      will cause it to load http://www.example.com/payload

      however the javascript that i dont have access to gives its payload as a number
      for example lets say its lfx123

      so i get www.example.com/lfx123

      i want it to load my page that is titled lfx123.html

      if i rename the file to just lfx123 i just get the css code as text in the browser window


      • #4
        fixed it

        ill mark this as solved if i can figure out how


        • #5
          To mark it as solved edit your first post (in advanced mode) and there is a select next to the thread title where you can choose “resolved”.
          Stop solving problems you don’t yet have!