Ok, this is weird. I am working on a GIS web site, and i have the next problem. I need to tweak one of the main functions in the site (because i constantly get an error about one of its lines); the problem is that i can’t see that chunk of code in any way! I know where it is, because when i open the page with “View Source” browser’s option (Chrome), i see the code i need to change, but that is the only way i can see it! I tried Dreamweaver, Notepad++, Visual Studio 2008 (because it’s an .aspx page), still nothing. Here is the preview:
<body>
<form id="form1" runat="server">
<div align="center">
<asp:PlaceHolder ID="phScript" runat="server"></asp:PlaceHolder>
<hr />
<br />
<table style="width: 50%;">
<tr>
<td style="font-family: 'Times New Roman', Times, serif; font-size: large;font-weight: bold;">
<asp:Label ID="lblTitol" runat="server" Text="CÀLCUL ÀREES D'INFLUENCIA AL VOLTAN D'UNA ENTITAT"></asp:Label>
</td>
</tr>
<tr>
<td>
</td>
</tr>
</table>
And this is that portion of code as seen in browser’s source:
<body>
<form name="form1" method="post" action="zi.aspx" id="form1">
<div align="center">
<SCRIPT language="javascript" type="text/javascript">parent.frames['map'].Oper='4';parent.frames['map'].MetodeTreball='ILLES';parent.frames['map'].Iter='1';parent.frames['map'].Entitats='CEIP';parent.frames['map'].RadiFix='400';parent.frames['map'].Cobertura='100';parent.frames['map'].ReloadMap(1200);</SCRIPT>
<br />
<br />
<br />
<hr />
<br />
<table style="width: 50%;">
<tr>
<td style="font-family: 'Times New Roman', Times, serif; font-size: large; font-weight: bold;">
<span id="lblTitol">CÀLCUL ÀREES D'INFLUENCIA AL VOLTAN D'UNA ENTITAT</span>
</td>
</tr>
<tr>
<td>
</td>
</tr>
</table>
It is the JavaScript part with parent.frames bla bla part that i have to change, if i can. As i can see, that portion of the code is in aspPlaceHolder, is there any way i can access that part and change it? Sorry for this much code, but i tried to explain the problem as closely as i can.
Remember, the source code you are seeing in the first part is the source code of the ASPX file. This will be parsed by the ASP.Net runtime and the HTML sent to the client. So what you want to do is look at the code that is updating the asp:PlaceHolder called phScript.
If you have access to the source code, this will be in the code behind for the ASPX page – it will have the same name but the extension .cs.
This should tell you where and how the javascript is being constructed, at least.