Welcome Guest, Not a member yet? Register   Sign In
stackoverflow works but my site doesn't
#1

I have an About button:

    $('#btnAbout').button().click(function () {
    // var newURL = "https://substantiator.com/Help/html/Introduction.html/";
    var newURL = "http://stackoverflow.com/";
     chrome.tabs.create({ url: newURL });
});

When I use a link to go to stackoverflow it works fine. But when I try to go to my page  I get a 404 error. 

The address in the browser shows:

https://substantiator.com/https://substa...tion.html/

what's going on?
proof that an old dog can learn new tricks
Reply
#2

I tried the supplied URL and a 301 Http response  was returned.

You may check the URL at this address by pasting in the URL and checking the Http, httpL//wwwm https or https://www checkboxes:

https://www.johns-jokes.com/downloads/sp-i/jb-url-test/?

Please note that it is standard practice to NOT use uppercase in the URL
Reply
#3

(05-10-2018, 02:54 PM)richb201 Wrote:     $('#btnAbout').button().click(function () {
    //  var newURL = "https://substantiator.com/Help/html/Introduction.html/";
    var newURL = "http://stackoverflow.com/";
     chrome.tabs.create({ url: newURL });
});

Change your code as below:

Code:
    $('#btnAbout').button().click(function () {
    //  var newURL = "https://substantiator.com/Help/html/Introduction.html/";
    var newURL = "http://stackoverflow.com/";

   var win = window.open(newURL , '_blank');
   win.focus();

});
I'm a person from Turkiye. I don't know English very well and i can't write what i want to say sometimes (as now happenes  Blush ).

If i write something by mistake; please don't distress it and try to understand what i want to write.
Reply
#4

This is what your error is saying!

/favicon.ico:1 Failed to load resource: the server responded with a status of 404 ()
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#5

(This post was last modified: 05-11-2018, 04:27 AM by richb201.)

Insite, I have had problems with some of the icons for a while. I was never able to figure out why that was happening but it didn't seem to affect the operation of the grid.

ui-bg_glass_80_d7ebf9_1x400.png:1 Failed to load resource: net::ERR_FILE_NOT_FOUND
ui-bg_highlight-soft_100_deedf7_1x100.png:1 Failed to load resource: net::ERR_FILE_NOT_FOUND
ui-bg_highlight-hard_100_f2f5f7_1x100.png:1 Failed to load resource: net::ERR_FILE_NOT_FOUND
ui-bg_glass_50_3baae3_1x400.png:1 Failed to load resource: net::ERR_FILE_NOT_FOUND
ui-icons_3d80b3_256x240.png:1 Failed to load resource: net::ERR_FILE_NOT_FOUND
ui-bg_glass_100_e4f1fb_1x400.png:1 Failed to load resource: net::ERR_FILE_NOT_FOUND
ui-icons_2694e8_256x240.png:1 Failed to load resource: net::ERR_FILE_NOT_FOUND

just tried var newURL = "http://yahoo.com";    which works fine. I then tried going to the root of my site substantiator.com, which works fine too. Perhaps I need  a redirect on the site?
proof that an old dog can learn new tricks
Reply
#6

(This post was last modified: 05-11-2018, 05:52 AM by richb201.)

solved. Seems that the capitalization in the paths was important.

this one works great from my javascript Extenesion:

var newURL = "https://substantiator.com/Help/html/SubstantiatorController.html";
       chrome.tabs.create({ url: newURL });

If I want to run the same code above from my CI application how can I do that?
proof that an old dog can learn new tricks
Reply
#7

The resource errors are because it cannot figure out the paths...
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#8

Thanks Insite. I tried fixing that last year for a while. I eventually gave up since it seemed to be working. Is there any ability in CI (or PHP) or Jquery (I guess) to create a new tab in Chrome?
proof that an old dog can learn new tricks
Reply
#9

This is how I setup my assets folder, You can change to suit your needs but do not move the assets folder
out of the public / public_html folder that's where index.php is.

public / public_html folder
-- index.php
-- assets
[Image: assets_folder.png]

And this is how I setup the header links:

Code:
<!-- favicon -->
<link rel="icon" href="<?php echo base_url('assets/favicon.ico'); ?>">

<!-- Bootstrap CSS file -->
<link href="<?php echo base_url('assets/bootstrap-3.3.7/css/bootstrap.min.css'); ?>" rel="stylesheet">
<link href="<?php echo base_url('assets/bootstrap-3.3.7/css/bootstrap-theme.min.css'); ?>" rel="stylesheet">

<!-- Font Awesome Fonts -->
<link href="<?php echo base_url('assets/font-awesome/css/font-awesome.min.css'); ?>" rel="stylesheet">

<!-- Custom Application Overrides CSS. -->
<link href="<?php echo base_url('assets/css/web-app.css'); ?>" rel="stylesheet">
Hope that helps...
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply




Theme © iAndrew 2016 - Forum software by © MyBB