Javascript to HTML output

Discussion in 'JavaScript' started by Mike1958, Dec 30, 2007.

  1. #1
    On a webpage I have some external content being pulled in with Javascript. When I look at the source code of the rendered page I see the actual javascript embedded in the HTML. Is there a method using PHP or some kind of output redirection so the actual content is embeded in the rendered web page, not the script itself? In other words if I view the page source I'd see the actual content output by the script in HTML format. but not see the script itself.

    Thx.
    Mike
     
    Mike1958, Dec 30, 2007 IP
  2. hogan_h

    hogan_h Peon

    Messages:
    199
    Likes Received:
    30
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I don't think there is an automatic method, like 1 line function code, but you could build something in php.

    It depends, how interactive that js script is and if it expects some client side parameters.

    In any case, depending on the js script, you could either rewrite javascript code to php code and omit js script completely or call the js script with php, gather its output it echo it as html together with page you are outputting.
    Personally, if the js script is not to complex i would go that road and rewrite it as php if possible.
     
    hogan_h, Dec 30, 2007 IP
  3. facebuddies2007

    facebuddies2007 Guest

    Messages:
    252
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Hi

    I am looking to place a java link on my faceparty profile

    How do i make a jave link to another url please

    Thanks
     
    facebuddies2007, Dec 30, 2007 IP
  4. MMJ

    MMJ Guest

    Messages:
    460
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #4
    @facebuddies2007: make your own thread. :p :)

    @OP: Sorry, I don't follow.
     
    MMJ, Dec 31, 2007 IP
  5. temp2

    temp2 Well-Known Member

    Messages:
    1,231
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    150
    Digital Goods:
    2
    #5
    @facebuddies2007"
    window.location = 'new-url';
    window.open('new-url');
     
    temp2, Jan 2, 2008 IP