Help - Search - Members - Calendar
Full Version: index.html File Uneditable
HTMLHelp Forums > General Interest > Jobs Seeking Programmers
ggash
I recently purchased this website template (http://sodayoda.com) and am in the process of editing the information on the site. I quickly noticed that with the HTML editor I'm using, if I open the index.html file and save it, even without changing the code, this is what happened:

Pre-opening file: http://sodayoda.com/#!/pageSplash
After-opening file: http://sodayoda.com/jamison/#!/pageSplash (Links don't work)
http://sodayoda.com/jamison/#!/pageAbout (NavBar links don't work)

I can't figure out why this keeps happening. I'm not even changing the file.

I also don't understand why when I go to the home page sodayoda.com, the domain name doesn't remain sodayoda.com but changes to sodayoda.com/#!/pageSplash. Thoughts?

I've attached the index.html file I'm having trouble with below. Any info on how I can solve this problem, I'd really appreciate it.
Christian J
QUOTE(ggash @ Jan 16 2013, 12:43 AM) *

Pre-opening file: http://sodayoda.com/#!/pageSplash
After-opening file: http://sodayoda.com/jamison/#!/pageSplash (Links don't work)

The links are missing. First version:

CODE
<li class="marRight1">
<a href="#!/pageAbout">
<div class="splashText">About</div>
<div class="splashText_over">About</div>
<div class="splash_over"></div>
</a>
</li>

second version:

CODE
<li class="marRight1">
<div class="splashText">About</div>
<div class="splashText_over">About</div>
</li>



QUOTE

Same thing, the links are removed. Before:

CODE
<ul id="menu">
<li><a href="#!/pageSplash"><div class="mText">splash</div></a></li>

now:

CODE
<ul id="menu">
<li>
<div class="mText">splash</div>
</li>


QUOTE
I can't figure out why this keeps happening. I'm not even changing the file.

Placing links around DIV (or other block level) elements is only allowed from HTML5. Could it be that your HTML editor (which one?) doesn't support HTML5, and tries to repair what it considers invalid HTML by stripping away the A elements? unsure.gif But that doesn't explain why the DIV with the CLASS splash_over is missing too.

QUOTE
I also don't understand why when I go to the home page sodayoda.com, the domain name doesn't remain sodayoda.com but changes to sodayoda.com/#!/pageSplash. Thoughts?

It seems to be a javascript redirect. I'd suspect the jQuery function that runs when the page is loaded.
ggash
Would you be willing to fix it for me if I gave you $40? I'm very much a novice and am not confident enough in doing it myself.

QUOTE(Christian J @ Jan 15 2013, 08:05 PM) *

QUOTE(ggash @ Jan 16 2013, 12:43 AM) *

Pre-opening file: http://sodayoda.com/#!/pageSplash
After-opening file: http://sodayoda.com/jamison/#!/pageSplash (Links don't work)

The links are missing. First version:

CODE
<li class="marRight1">
<a href="#!/pageAbout">
<div class="splashText">About</div>
<div class="splashText_over">About</div>
<div class="splash_over"></div>
</a>
</li>

second version:

CODE
<li class="marRight1">
<div class="splashText">About</div>
<div class="splashText_over">About</div>
</li>



QUOTE

Same thing, the links are removed. Before:

CODE
<ul id="menu">
<li><a href="#!/pageSplash"><div class="mText">splash</div></a></li>

now:

CODE
<ul id="menu">
<li>
<div class="mText">splash</div>
</li>


QUOTE
I can't figure out why this keeps happening. I'm not even changing the file.

Placing links around DIV (or other block level) elements is only allowed from HTML5. Could it be that your HTML editor (which one?) doesn't support HTML5, and tries to repair what it considers invalid HTML by stripping away the A elements? unsure.gif But that doesn't explain why the DIV with the CLASS splash_over is missing too.

QUOTE
I also don't understand why when I go to the home page sodayoda.com, the domain name doesn't remain sodayoda.com but changes to sodayoda.com/#!/pageSplash. Thoughts?

It seems to be a javascript redirect. I'd suspect the jQuery function that runs when the page is loaded.

Christian J
QUOTE(ggash @ Jan 16 2013, 02:27 AM) *

Would you be willing to fix it for me if I gave you $40?

Not me, but I can move the thread to the Jobs Seeking Programmers forum if you want.

QUOTE
I'm very much a novice and am not confident enough in doing it myself.

Adding back the links looks like an easy task with a text editor. No idea about the redirect part, maybe it's needed for something.

Christian J
QUOTE(Christian J @ Jan 16 2013, 02:05 AM) *

QUOTE(ggash @ Jan 16 2013, 12:43 AM) *

I also don't understand why when I go to the home page sodayoda.com, the domain name doesn't remain sodayoda.com but changes to sodayoda.com/#!/pageSplash. Thoughts?

It seems to be a javascript redirect. I'd suspect the jQuery function that runs when the page is loaded.

Found it! http://sodayoda.com/js/scripts.js contains the following:

CODE
$(document).ready(function(){
    if(location.hash.length == 0){
        location.hash="!/"+$('#content > ul > li:first-child').attr('id');

When the page is loaded, it checks if the page's URL contains any "#" (hash) character. If not it adds this: "#!/", followed by the ID of the first LI element here:

CODE
<!--content -->
<article id="content">
    <ul>
<li id="pageSplash"></li>

--which happens to be "pageSplash" on your page. You can probably change that ID to something else, but if you get rid the whole thing maybe something else stops working. unsure.gif
ggash
Yes please. If you could move the thread that way, I'd appreciate it. I can't really figure it out.

QUOTE(Christian J @ Jan 15 2013, 09:07 PM) *

QUOTE(ggash @ Jan 16 2013, 02:27 AM) *

Would you be willing to fix it for me if I gave you $40?

Not me, but I can move the thread to the Jobs Seeking Programmers forum if you want.

QUOTE
I'm very much a novice and am not confident enough in doing it myself.

Adding back the links looks like an easy task with a text editor. No idea about the redirect part, maybe it's needed for something.

This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2024 Invision Power Services, Inc.