PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old February 11th, 2013, 11:24 PM
zxcvbnm's Avatar
zxcvbnm zxcvbnm is offline
A Change of Season
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Mar 2004
Posts: 1,681 zxcvbnm User rank is Second Lieutenant (5000 - 10000 Reputation Level)zxcvbnm User rank is Second Lieutenant (5000 - 10000 Reputation Level)zxcvbnm User rank is Second Lieutenant (5000 - 10000 Reputation Level)zxcvbnm User rank is Second Lieutenant (5000 - 10000 Reputation Level)zxcvbnm User rank is Second Lieutenant (5000 - 10000 Reputation Level)zxcvbnm User rank is Second Lieutenant (5000 - 10000 Reputation Level)zxcvbnm User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 2 Weeks 5 Days 19 h 59 m 39 sec
Reputation Power: 71
Howcom view source shows the scripts content!

Hello

How are you?

This is not a php issue really but I thought I post here this is home.

Recently when I view source, I see the content of all <script> tags for some reason!

For example instead of

<script src="color.js"></script>

I see its content as below:

Code:
img.tcalIcon{cursor:pointer;margin-left:1px;vertical-align:middle;}/**/div#tcal{position:absolute;visibility:hidden;z-index:100;width:158px;padding:2px 0 0 0;}/**/div#tcal table{width:100%;border:1px solid silver;border-collapse:collapse;background-color:white;}/**/div#tcal table.ctrl{border-bottom:0;}/**/div#tcal table.ctrl td{width:15px;height:20px;}/**/div#tcal table.ctrl th{background-color:white;color:black;border:0;}/**/div#tcal th{border:1px solid silver;border-collapse:collapse;text-align:center;padding:3px 0;font-family:tahoma,verdana,arial;font-size:10px;background-color:gray;color:white;}/**/div#tcal td{border:0;border-collapse:collapse;text-align:center;padding:2px 0;font-family:tahoma,verdana,arial;font-size:11px;width:22px;cursor:pointer;}/**/div#tcal td.othermonth{color:silver;}div#tcal td.weekend{background-color:#ACD6F5;}div#tcal td.today{border:1px solid red;}div#tcal td.selected{background-color:#FFB3BE;}/**/iframe#tcalIF{position:absolute;visibility:hidden;z-index:98;border:0;}/**/div#tcalShade{position:absolute;visibility:hidden;z-index:99;}div#tcalShade table{border:0;border-collapse:collapse;width:100%;}div#tcalShade table td{border:0;border-collapse:collapse;padding:0;}
</style>
<link rel="stylesheet" type="text/css" href="css/prototip.css" /><link href="css/default.css" rel="stylesheet" type="text/css" media="screen" /><link rel="shortcut icon" href="favicon.ico" /><style type="text/css"><!-- @import url("css/default.css");--></style> <!--[if lt IE 7.]><script defer type="text/javascript" src="pngfix.js"></script> <![endif]--><!--[if IE 7]><style type="text/css" media="all">@charset"utf-8";#nav_container ul li.left a.left{&margin-left:232px;}#nav_container ul li ul{display:none;position:absolute;top:38px;&left:283px;z-index:550;border-bottom:solid 0px #999999;padding-left:10px;}#nav_container ul li ul.r{&left:765px;}</style> <![endif]--><script type='text/javascript' src="scriptaculous/src/scriptaculous.js"></script> <script type='text/javascript' src='httdps://ajax.googleapis.com/ajax/libs/prototype/1/prototype.js'></script> <script type='text/javascript'  style="display:none">var A_TCALDEF={'months':['January','February','March','April','May','June','July','August','September','October','November','  December'],'weekdays':['Su','Mo','Tu','We','Th','Fr','Sa'],'yearscroll':true,'weekstart':0,'centyear':70,'imgpath':'img/'};function f_tcalParseDate(s_date){var re_date=/^\s*(\d{1,2})\/(\d{1,2})\/(\d{2,4})\s*$/;if(!re_date.exec(s_date))
return alert("Invalid date: '"+s_date+"'.\nAccepted format is dd/mm/yyyy.")
var n_day=Number(RegExp.$1),n_month=Number(RegExp.$2),n_year=Number(RegExp.$3);if(n_year<100)
n_year+=(n_year<this.a_tpl.centyear?2000:1900);if(n_month<1||n_month>12)
return alert("Invalid month value: '"+n_month+"'.\nAllowed range is 01-12.");var d_numdays=new Date(n_year,n_month,0);if(n_day>d_numdays.getDate())
return alert("Invalid day of month value: '"+n_day+"'.\nAllowed range for selected month is 01 - "+d_numdays.getDate()+".");return new Date(n_year,n_month-1,n_day);}
function f_tcalGenerDate(d_date){return((d_date.getDate()<10?'0':'')+d_date.getDate()+"/"
+(d_date.getMonth()<9?'0':'')+(d_date.getMonth()+1)+"/"
+d_date.getFullYear());}
function tcal(a_cfg,a_tpl){if(!a_tpl)
a_tpl=A_TCALDEF;if(!window.A_TCALS)
window.A_TCALS=[];if(!window.A_TCALSIDX)
window.A_TCALSIDX=[];this.s_id=a_cfg.id?a_cfg.id:A_TCALS.length;window.A_TCALS[this.s_id]=this;window.A_TCALSIDX[window.A_TCALSIDX.length]=this;this.f_show=f_tcalShow;this.f_hide=f_tcalHide;this.f_toggle=f_tcalToggle;this.f_update=f_tcalU  pdate;this.f_relDate=f_tcalRelDate;this.f_parseDate=f_tcalParseDate;this.f_generDate=f_tcalGenerDate  ;this.s_iconId='tcalico_'+this.s_id;this.e_icon=f_getElement(this.s_iconId);if(!this.e_icon){documen  t.write('<img src="'+a_tpl.imgpath+'cal.gif" id="'+this.s_iconId+'" onclick="A_TCALS[\''+this.s_id+'\'].f_toggle()" class="tcalIcon" alt="Open Calendar" />');this.e_icon=f_getElement(this.s_iconId);}
this.a_cfg=a_cfg;this.a_tpl=a_tpl;}
function f_tcalShow(d_date){if(!this.a_cfg.controlname)
throw("TC: control name is not specified");if(this.a_cfg.formname){var e_form=document.forms[this.a_cfg.formname];if(!e_form)
throw("TC: form '"+this.a_cfg.formname+"' can not be found");this.e_input=e_form.elements[this.a_cfg.controlname];}
else
this.e_input=f_getElement(this.a_cfg.controlname);if(!this.e_input||!this.e_input.tagName||this.e_in  put.tagName!='INPUT')
throw("TC: element '"+this.a_cfg.controlname+"' does not exist in "
+(this.a_cfg.formname?"form '"+this.a_cfg.controlname+"'":'this document'));this.e_div=f_getElement('tcal');if(!this.e_div){this.e_div=document.createElement("DIV");this.e_div.id='tcal';document.body.appendChild(this.e_div);}
this.e_shade=f_getElement('tcalShade');if(!this.e_shade){this.e_shade=document.createElement("DIV");this.e_shade.id='tcalShade';document.body.appendChild(this.e_shade);}
t.....

Reply With Quote
  #2  
Old February 12th, 2013, 12:22 AM
Catacaustic's Avatar
Catacaustic Catacaustic is offline
Code Monkey V. 0.9
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Mar 2005
Location: A Land Down Under
Posts: 1,901 Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level) 
Time spent in forums: 2 Weeks 4 Days 19 h 31 m 27 sec
Reputation Power: 1798
What you've copied there is correct. When you actually look at the tags with correct formatting, the JS script links are:

Code:
<script type='text/javascript' src="scriptaculous/src/scriptaculous.js"></script>
<script type='text/javascript' src='httdps://ajax.googleapis.com/ajax/libs/prototype/1/prototype.js'></script>
<script type='text/javascript'  style="display:none">
    var A_TCALDEF={'months':['January','February','March'...

The JS code there is set up in a standard script tag the way that it should be. There's no JS that's being displayed from the external files.

Reply With Quote
  #3  
Old February 12th, 2013, 12:53 AM
zxcvbnm's Avatar
zxcvbnm zxcvbnm is offline
A Change of Season
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Mar 2004
Posts: 1,681 zxcvbnm User rank is Second Lieutenant (5000 - 10000 Reputation Level)zxcvbnm User rank is Second Lieutenant (5000 - 10000 Reputation Level)zxcvbnm User rank is Second Lieutenant (5000 - 10000 Reputation Level)zxcvbnm User rank is Second Lieutenant (5000 - 10000 Reputation Level)zxcvbnm User rank is Second Lieutenant (5000 - 10000 Reputation Level)zxcvbnm User rank is Second Lieutenant (5000 - 10000 Reputation Level)zxcvbnm User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 2 Weeks 5 Days 19 h 59 m 39 sec
Reputation Power: 71
Quote:
Originally Posted by Catacaustic
What you've copied there is correct. When you actually look at the tags with correct formatting, the JS script links are:

Code:
<script type='text/javascript' src="scriptaculous/src/scriptaculous.js"></script>
<script type='text/javascript' src='httdps://ajax.googleapis.com/ajax/libs/prototype/1/prototype.js'></script>
<script type='text/javascript'  style="display:none">
    var A_TCALDEF={'months':['January','February','March'...

The JS code there is set up in a standard script tag the way that it should be. There's no JS that's being displayed from the external files.
It used to be different! Never saw the actual JS code.

Reply With Quote
  #4  
Old February 12th, 2013, 04:26 PM
Catacaustic's Avatar
Catacaustic Catacaustic is offline
Code Monkey V. 0.9
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Mar 2005
Location: A Land Down Under
Posts: 1,901 Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level) 
Time spent in forums: 2 Weeks 4 Days 19 h 31 m 27 sec
Reputation Power: 1798
What exactly "used to be different"?

Reply With Quote
  #5  
Old February 12th, 2013, 05:27 PM
aeternus's Avatar
aeternus aeternus is offline
For POny!
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2012
Location: Amsterdam
Posts: 416 aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level)aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level)aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level)aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level)aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level)aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level)aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level)aeternus User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 5 Days 4 h 56 m 43 sec
Reputation Power: 114
pay close attention to what catacaustic said.
prototype.js & scriptaculous.js don't show the code (they have a src attribute)
the other script tag doesn't and thus kind of forced to have the actual JS inside the tags
__________________
PHP Tutorial

Reply With Quote
  #6  
Old February 12th, 2013, 06:34 PM
zxcvbnm's Avatar
zxcvbnm zxcvbnm is offline
A Change of Season
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Mar 2004
Posts: 1,681 zxcvbnm User rank is Second Lieutenant (5000 - 10000 Reputation Level)zxcvbnm User rank is Second Lieutenant (5000 - 10000 Reputation Level)zxcvbnm User rank is Second Lieutenant (5000 - 10000 Reputation Level)zxcvbnm User rank is Second Lieutenant (5000 - 10000 Reputation Level)zxcvbnm User rank is Second Lieutenant (5000 - 10000 Reputation Level)zxcvbnm User rank is Second Lieutenant (5000 - 10000 Reputation Level)zxcvbnm User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 2 Weeks 5 Days 19 h 59 m 39 sec
Reputation Power: 71
Previously I used to see only
Code:
<script type='text/javascript' src="scriptaculous/src/scriptaculous.js"></script>

Reply With Quote
  #7  
Old February 12th, 2013, 06:54 PM
Triple_Nothing Triple_Nothing is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2009
Posts: 313 Triple_Nothing User rank is Corporal (100 - 500 Reputation Level)Triple_Nothing User rank is Corporal (100 - 500 Reputation Level)Triple_Nothing User rank is Corporal (100 - 500 Reputation Level)Triple_Nothing User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 3 Days 15 h 8 m 41 sec
Reputation Power: 5
So, this is your code you are writing, and you didn't even add prototype.js?

Reply With Quote
  #8  
Old February 12th, 2013, 08:25 PM
E-Oreo's Avatar
E-Oreo E-Oreo is offline
Lost in code
Dev Shed God 7th Plane (8000 - 8499 posts)
 
Join Date: Dec 2004
Posts: 8,063 E-Oreo User rank is General 92nd Grade (Above 100000 Reputation Level)E-Oreo User rank is General 92nd Grade (Above 100000 Reputation Level)E-Oreo User rank is General 92nd Grade (Above 100000 Reputation Level)E-Oreo User rank is General 92nd Grade (Above 100000 Reputation Level)E-Oreo User rank is General 92nd Grade (Above 100000 Reputation Level)E-Oreo User rank is General 92nd Grade (Above 100000 Reputation Level)E-Oreo User rank is General 92nd Grade (Above 100000 Reputation Level)E-Oreo User rank is General 92nd Grade (Above 100000 Reputation Level)E-Oreo User rank is General 92nd Grade (Above 100000 Reputation Level)E-Oreo User rank is General 92nd Grade (Above 100000 Reputation Level)E-Oreo User rank is General 92nd Grade (Above 100000 Reputation Level)E-Oreo User rank is General 92nd Grade (Above 100000 Reputation Level)E-Oreo User rank is General 92nd Grade (Above 100000 Reputation Level)E-Oreo User rank is General 92nd Grade (Above 100000 Reputation Level)E-Oreo User rank is General 92nd Grade (Above 100000 Reputation Level)E-Oreo User rank is General 92nd Grade (Above 100000 Reputation Level)  Folding Points: 945 Folding Title: Novice Folder
Time spent in forums: 2 Months 1 Day 6 h 49 m 31 sec
Reputation Power: 7104
As stated previously, if the script tags contains a src attribute then the body does not contain code. If the script tag does not contain a src attribute, then either the body contains code or the tag is useless. There is never any type of automatic conversion between the two methods.

If your code used to be different, it's because the code was changed. We can't tell you who changed it or why of course.
__________________
PHP FAQ
How to program a basic, secure login system using PHP
Connect with me on LinkedIn


Quote:
Originally Posted by Spad
Ah USB, the only rectangular connector where you have to make 3 attempts before you get it the right way around

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPHP Development > Howcom view source shows the scripts content!

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap