1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

How can i show result from the javascript

Discussion in 'JavaScript' started by Tuhin1234, Jun 3, 2017.

  1. #1
    var url = "http://free.mysite.net/id/demo_video.mp4";
    url.replace(url.split('.')[0], 'paid');
    Code (JavaScript):
    when i use in my php page it show blank page...
     
    Tuhin1234, Jun 3, 2017 IP
  2. Blank ™

    Blank ™ Well-Known Member

    Messages:
    223
    Likes Received:
    18
    Best Answers:
    6
    Trophy Points:
    110
    #2
    How are you using it in your PHP page? url (variable) needs to be printed (document.write to start with) to be visible.

    Try something like this:
    
    var url = "http://free.mysite.net/id/demo_video.mp4";
    url = url.replace(url.split("//")[1].split(".")[0], "paid");
    
    document.write(url);
    
    Code (markup):
     
    Last edited: Jun 3, 2017
    Blank ™, Jun 3, 2017 IP
  3. Tuhin1234

    Tuhin1234 Active Member

    Messages:
    178
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    71
    #3
    Thanks sir
     
    Tuhin1234, Jun 3, 2017 IP
  4. Samuel Gibson

    Samuel Gibson Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #4
    I agree with Blank Greenhorn - And it depends on how you are using the PHP page.
     
    Samuel Gibson, Jun 17, 2017 IP