|
I'm writing a simple program in Javascript that dynamically processes Xpaths. So when I read a xml document, I want to display it in a Div with the innerHTML property. To take care the the > and <, I do a string replace. But I was wondering if there is a built in function for doing this type of encoding rather than a search/replace.
Anyone know?
*->>Always working on my game, teach me
*->>something new.
cout << "dav1d\n";
|
|
|
|
|
I'm not certain, but doesn't escape convert funny characters into the hex equivalent???
Typo...it's escape NOT encode!!!
It's frustrating being a genius and living the life of a moron!!!
|
|
|
|
|
When using, say, a <code><div id="d1"> container with visibility:hidden containing multiple, say, <span id="s1"> stuff </span> <span id="s2"> stuff2 </span> <span id="s3"> stuff3 </span> </div></code>
in .css file there is ....<code> span {visibility:visible}; div {visibility:hidden}</code>
I would expect that changing the visibility property of the id d1 to show and hide the spans within that div. Such is not the case. They show or don't show depending only on the span visibility property.
Can someone show me how to do this?
Larry
|
|
|
|
|
Not so, paste the following into a doc:
<script language="javascript">
function h(){
Contain.style.visibility="hidden";
}
</script>
<p><input onclick="h()" type="button" value="Hide"></p>
<div id="Contain" style="background-color:yellow">
<span>test</span>
<span>test</span>
</div>
*->>Always working on my game, teach me
*->>something new.
cout << "dav1d\n";
|
|
|
|
|
instead of visibility try
display: none | display: block
It's frustrating being a genius and living the life of a moron!!!
|
|
|
|
|
I just ran into the stranges thing in javascript. I was trying to set the action attribute on and HTML tag dynamically. I needed to attach the value of local variable to the request string.
There are quite logical code bits that work in Mozilla FireFox but fail to work in Internet Explorer.
I had a page similar to this:
I tried to change the submit action on my form:
function func()
{
document.myform.setAttribute("action", "foobar.asp");
}
This strange thing is that even though the action for the form is an attribute of the FORM tag, you cannot affect it that way.
You have to do this:
document.myform.action = "foobar.asp";
But this doesnt work in Internet Explorer because the INPUT node for the submit button is named action it all gets confused. It works fine in Mozilla.
The reason its all messed up is because somebody decided to define this particular part of the language to allow you to access attributes with the dot syntax. So it must get confused by the statement "document.myform.action" because it doesnt know if you mean the action attribute or form INPUT button.
Is there a reason why action isn't accessible via the standard attribute methods in Internet Explorer on the FORM tag?
|
|
|
|
|
i have a website that has asp pages not aspx and once i logon the website and i go past the first page after logon i can't hit my back button because it sayes unable to display page can somebody help me fix this i really need to set it up to be able to hit back
chad
|
|
|
|
|
I hv found many threads regarding this:
1. http://support.microsoft.com/?id=316148
2. http://support.microsoft.com/default.aspx?scid=kb;en-us;821268
3.
http://www.error-bank.com/microsoft.public.dotnet.general/113596_Thread.aspx
4. http://support.microsoft.com/?id=822171
It has to do something with AppPool and Antivirus Software as I read on MicroSoft and HELM Forums.
Hope this helps
---------------
Cheap and reliable Windows Hosting. Plans start as low as $1. Checkout our Windows Shared Hosting Plans
|
|
|
|
|
ok i have figured out why the back button dose not work it because all the people in my off have "do not save encrypted pages to disk" check in the internet options how do i fix this problem without having to go and uncheck this option from everybodys computer
chad
|
|
|
|
|
I am attempting to create a master detail html page using frames. The master frame with id='summary' sources summary.aspx which contains a datagrid. Within the datagrid are 4 bound columns and a 'Details' button column. The 'details' button invokes the onItemCommand and displays the details of the selected record in a form in a second frame in the html page. This frame is named 'Details' and sources details.aspx. I have set <base target="Details" /> in summary.aspx.
I have also set up column sorting on the datagrid in summary.aspx. However, with target set as above this produces an error. If I remove the target attribute I of course then have details.aspx opening in frame 'middle'.
Can anyone please provide information on how to resolve this problem such that I can set target dynamically when the details button in the datagrid is selected and at other times have target set to '_self'?
|
|
|
|
|
Hi guys,
This is driving me insane and Im sure its quite simple but are there any docx, links, samples etc... on how to call a batch file from a web page (be it in html, js, asp or whatever). I did a google search but half the links to this sort of query are broken, have been removed or dont exist anymore. Anyone have any ideas? Thanks!
|
|
|
|
|
|
Colin Angus Mackay wrote:
You mean like a DOS .bat file?
Exactly, That link was perfect. Much appreciated Colin!
|
|
|
|
|
I have a simple http webserver in c# and it works fine, but how can I let my webserver support asp,
so that I can call *.asp files in my virtual web server directory?
Looking forward to any suggestions!
Knack
|
|
|
|
|
an someone tell me how to send a value from my popup window to a text box in the referer document?
I have a main page with a button that opens a window. The users clicks a button on the popup. Now I want he value fro mthe click to populate a text box on the main page. I am using javascript.
Thanks
|
|
|
|
|
On the page that will call the popup, set your link to something like this:
<A href="javascript:calendar_window=window.open('[popup-name].aspx?formname=Form1.DueDate','calendar_window','width=210,height=188');calendar_window.focus()">
Select New Due Date</A>
You will need to insert a literal control onto your popup page first. In the event method that fires to show your user has selected whatever, you will need to put this string into your literal control:
<script language='javascript'>
window.opener.(Request.QueryString["formname"]).value = '[new value]';
window.close();
</script>
Obviously, replacing the form name item and the new value item with something specific to your situation.
Pegmeister
|
|
|
|
|
Hows everyone doing..
I have just recently created a few reports for this web app we are working on. Upon constructing the reports and connecting them to some stored procedures i noticed that the parameters passed to the report only allow a single selection for a specific parameter.. for example if you have an employee parameter it only allows a single selection which sucks if you want the used to be able to pick a few employees.
i was wondering if anyone had information on creating or modifying the current reporting Service Api that renders reports so that one could create custom parameter selection tools.
here is an example of what im looking for.
http://dspace.dial.pipex.com/town/drive/xxg48/CustomParameters.html
any information would be great!
|
|
|
|
|
Hi to All!
I am developing an ISAPI filter for IIS 6.0 providing Customized "Basic" Authentication for specific folders and files with users defined in a file not of NTLM.
Now i have a problem executing this filter on IIS. When a secured resource is accessed then user name is checked in local variable. If user name not found then I call "pCtx->ServerSupportFunction" with 401.4 response and return a "SF_STATUS_REQ_FINISHED" from "OnUrlMap". But suprisingly session not ended as expected but the method "OnUrlMap" called for 3 to 4 times and finally browser shows a Login Box.
But here is another problem. during these calls, after first "OnUrlMap" call the Filter's "OnSendResponse" called by "HttpStatus" of 401 and followed by Last call of "OnUrlMap" there is another "OnSendResponse called with Statuts 200. And as a result when first Login Box is canceld then no events fired in filter and protected page opened in Browser.
These behaviours not repeat if one failed logon occour i.e. "Authentication:" header is readed in "OnPreprocHeader" and "pCtx->ServerSupportFunction" was called with 401.4.
Is their any one to help me resolving these issues? I am very much Thankfull to them.
|
|
|
|
|
<script language="Javascript">
<!--
function test(grade)
{
if(grade > 70)
document.write(" Passed");
else
document.write(" Failed");
}
document.write("C1 "+ test(65) + "<br>");
document.write("C1 ")+ test(65)+document.write("<br>");
//-->
</script>
I am getting following results:
FailedC1 undefined
C1 Failed
|
|
|
|
|
2 things:
firstly, put the function above your body tags. then you won't get the first "Failed".
secondly, since you're using a document.write in your function, why do you need to put the result of that function - which is nothing, hence the "undefined" - in the first document.write? either your function should return the value (which is why you would then use the first document.write scenario) or you must take the call to the function out of the document.write (as is the case with the second scenario)
--
Raoul Snyman
Saturn Laboratories
e-mail: raoul.snyman@saturnlaboratories.co.za
web: http://www.saturnlaboratories.co.za/
linux user: #333298
|
|
|
|
|
Thanks raoul
Ranjan Goyal
|
|
|
|
|
I created Portal Site using English version of SPS2003 that installed in my
machine, can I export that Portal Site to another machine that has different
language version of SPS2003 like Arabic?
|
|
|
|
|
I am trying to add a search to a website. The web server is running WIN 2K. I get the indexing service and catalog set up correctly cause the built in query works, but when I search with my ASP page it comes up blank. Am I missing a setting or does my code just not work? I just started with the sample code.
SEARCH PAGE
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Index Server Example Search Form</title>
</head>
<body>
<form method="POST" action="SearchResults.asp" name="frmSearch">
<p><input type="text" maxlength="255" name="query" size="20" value>
<input type="submit" value="Search" name="B1">
</p>
</form>
</body>
</html>
RESULTS PAGE
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Index Server Example Search Results Page</title>
</head>
<body>
<%
Dim sSearchString
Dim oQuery
sSearchString = Request.Form("query")
Const SEARCH_CATALOG = "IS-Sample" 'remember to change this
%>
<%
Set oQuery = Server.CreateObject("IXSSO.Query")
oQuery.Catalog = SEARCH_CATALOG
oQuery.Query = "@all " & sSearchString & " AND NOT #path *_* AND NOT #path *downloads* AND NOT #path *images* AND NOT #filename *.class AND NOT #filename *.asa AND NOT #filename *.css AND NOT #filename *postinfo.html"
oQuery.MaxRecords = 200
oQuery.SortBy = "rank[d]"
oQuery.Columns = "DocAuthor, vpath, doctitle, FileName, Path, Write, Size, Rank, Create, Characterization, DocCategory"
Set oRS = oQuery.CreateRecordSet("nonsequential")
%>
<%
If oRS.EOF Then
Response.Write "No pages were found for the query <i>" & sSearchString & "</i>"
Else
Do While Not oRS.EOF
Response.write "<b>FileName:</b> " & oRS("FileName") & "<br>"
Response.write "<b>doctitle:</b> " & oRS("doctitle") & "<br>"
Response.write "<b>Size:</b> " & oRS("Size") & "<br>"
Response.write "<b>Create:</b> " & oRS("Create") & "<br>"
Response.write "<b>Write:</b> " & oRS("Write") & "<br>"
Response.write "<b>Characterization:</b> " & oRS("Characterization") & "<hr>"
oRS.MoveNext
Loop
End If
%>
<%
Set oRS = nothing
Set oQuery = nothing
%>
</body>
</html>
|
|
|
|
|
Hi,
in my website logs, I see that a lot of people are going to my online store and don't seem to have cookies enabled. So I was wondering if it was better to use a database to keep track of a shopping cart or most websites rely on cookies?
What's the standard? Cookies or database?
Thanks!
|
|
|
|
|
I dn't know what others do, but I'd go for Database (probably because I detest cookies (accept if you can eat them )), if you do use cookies you should check if the user accepts them...
good luck.
"If I don't see you in this world, I'll see you in the next one... and don't be late." ~ Jimi Hendrix
|
|
|
|