|
i have error in this following code.please help me.
exactly in this line:
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
<title>vbs testing
sub display()
Dim strComputer,fso,objTxtFile,objWMIService
strComputer = document.myform.mytext.value
msgbox strComputer
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
set fso=createobject("Scripting.FileSystemObject")
set objTextFile=fs.CreateFileText("C:\sam301006.txt",true)
Set colRunningServices = objWMIService.ExecQuery("Select * from Win32_Service")
For Each objService in colRunningServices
Wscript.Echo objService.DisplayName & VbTab & objService.State
objTextFile.writeline(objService.DisplayName & VbTab & objService.State)
Next
end sub
|
|
|
|
|
Hi!
I am having a strange error.
I have two same application with two same database running in two different server.
The code to render radiobuttonlist in both application was
rdoPSWPriority.SelectedValue = DSInfo.Tables(0).Rows(0)(23).ToString
DSInfo is a datatable
where there is no value present in this record one of my server works fine while another server gives me error like
NumberSystem.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. at System.Web.UI.WebControls.ListControl.set_SelectedValue(String value) at Inspections.inspection.Page_Load(Object sender, EventArgs e) in ....
and stops to run the code
I just couldnt figure out what might be causing this problem I can do sumthing like
If DSInfo.Tables(0).Rows(0)(23).ToString <> Nothing Then
rdoPSWPriority.SelectedValue = DSInfo.Tables(0).Rows(0)(23).ToString
End If
but there are like hundreds of radio button so i am just being lazy
please help
|
|
|
|
|
This is not null error.
See the exception: ArgumentOutOfRangeException
The value which you want to select by using
rdoPSWPriority.SelectedValue = DSInfo.Tables(0).Rows(0)(23).ToString
in buttonlist is not present.
Try to get the data which is filling buttonlist and then check the value which you are assigning is present in that data.
I think this might help you
Regards,
Akhilesh Yadav
|
|
|
|
|
I mean this happens only when no value is selected. and it was woring fine in one server even when i dont select any value but in another server it gives me taht exception
|
|
|
|
|
try changing your query.
B'coz since there is null while you asssing it gives this exception.
Do following changes:
1. In your dropdown list give a default which will get selected if there is not selection.
2. Change your query, if query returns null value for 23rd col then change it to the default selection value of dropdown list.
for e.g. if it oracle you can change nvl(tbl.colname,0) here 0 is the value of default selection in dropdown list.
Hope it helps you
cheers,
Akhilesh Yadav
|
|
|
|
|
Don't know if anyone will have any suggestions for me, but I've got a navigation problem with the website I've been working on and was wondering if any of you've ever come across anything similar. The situation is that the javascript nav I'm using won't perform correctly specifically in Firefox for both Macs and PC's. However, it was working fine while I was posting it on my company's website to test it, but now seems to screw up after we handed over the files to the client to post. As far as I can tell the files are exactly the same, and that's why I'm so baffled. I was wondering if you knew of anything that could be happening on the server end of things that would cause it to be acting like this. I'm using html, css, and javascript on the site so it's not interacting with the server, but I'm in the dark when it comes to server-side issues so I didn't know if there could be anything causing it like using different kind of servers, etc. The client has their own server and is hosting it themselves, don't know if that'd play into the equation at
all.
To see what i mean you can go to www.girard.com to view what's wrong and go to www.capitaldesign.com/InProgress/Index.html to see how it should be working. Also, ignore any descrepancies in the code on the girard site because I've been trying different things on the actual website to try to get it working.
Any suggestions are much appreciated.
Nate
|
|
|
|
|
Consider making your Javascript fully ECMA standards compliant. It should then function with no problems in all the major browsers.
modified 1-Aug-19 21:02pm.
|
|
|
|
|
For a real noob, what is good practice when using javascript in user controls? It's bulky to render instance specific functions for each user control instance[1], so my first alternative is to attach parameterized functions to the parent page of the user control[2], but how do I include this code in the parent page? Do I hook into the rendering cycle of the control, find its parent, and inject script[3], or do I simply instruct users of the control that they must include the scripts?
|
|
|
|
|
I also got the same problem while creating javascript specific to usercontrol only.
It becomes more problematic when we need to put same usercontrol more than once in same parent form.
I endedup with creating seperated javascript files specific to each controls and functions were very generic in nature.
Regards,
Akhilesh Yadav
|
|
|
|
|
hi all..
any body have an idea..how to integrate a web applications with the thired party shipping services like FedEx,DHL,UPSC..
actually i have a web application(i am using c#.net ,visual studio 2005)which i need to integrate with ppl like fedex,Dhl to deliver my product to respective client..
pls reply..
With regard
--vickey
|
|
|
|
|
check their sites for integration standards.
|
|
|
|
|
Hi Friends
Any application that uses the ActivexControl IHIE4 (which is wrapper for Webbrowser control) will hang when a user tries to navigate to the URL for the second time. But, in IE 6 no such issue exists.
Thanks and Regards,
Aby
|
|
|
|
|
(Adding to my previous post...)
This is because the Webbrowser control which is compatible with IE 6 uses shdocvw.dll. But, the Webbrowser control which is compatible with IE 7 uses ieframe.dll. A fix for this would be to initialize IHIE4 in the Initialize event in the main application.
Thanks and Regards,
Aby
|
|
|
|
|
Hi All,
Thats the information that I could find until now. Just put on a post so that in case anyone faced an issue on upgrading to IE7; you could get to know one of the reasons for the error and deply a fix in time.
Do let me know if you have any new findings or resolutions for the same.
Thanks and Regards,
Aby
|
|
|
|
|
Hi All
I placed report viewer in my aspx page. in the run mode it is accupying full page.
I am passing parameters to the report from another aspx page
I need to put a back button in the page so when I click that button it should take me to the prevouse page from where I am passing the parameters.
Can any body help how can restrict the report viewer in the aspx page.
Regards
Shashank
|
|
|
|
|
hi
i think u have set the property of
crystalreportviewer.displaygrouptree = true
just set it to false
and u can put back button on same form where u have put the report veiwer
all the best
|
|
|
|
|
Hi Laxmikant
Thank you for your reply.
I think the code you have given is for Crystal reports
I am using Microsoft reporting services and I would like to decrease the width of the document map but don't want to supress the document map.
Regards
Shashank
|
|
|
|
|
Hi All
I am using the reporting services from couple of days.
the document map width is 25% in the screen size. I was trying find a option to decrease the width of document map but I was unable find the option.
Can any body help to decrease the document map width
Regards
Shashank
|
|
|
|
|
hi all,
i am writing a custom server control for asp.net and i need to implement some javascript to replace a hidden div with a div that is already visible then set the replaced div to visible.
at the moment it is working but when i simply toggle visibiity the div is not displayed at the same position within its parent div
this is my javascript include.
function ShowPanel(panel)
{
for(var i = 0; i < resources.length; i++)
{
var res = resources[i];
var obj = document.getElementById(res);
if(obj)
{
obj.style.visibility = 'hidden';
}
}
panel = document.getElementById(panel);
if(panel) { panel.style.visibility = "visible"; }
}
and this is my output for the javascripts vars
<script type="text/javascript">
<!--
var resources = new Array('ToolbarStart', 'ToolbarBackground', 'ToolbarEnd', 'ToolbarSeperator', 'ToolbarHome', 'ToolbarCopy', 'ToolbarDelete', 'ToolbarFolderUp', 'ToolbarMove', 'ToolbarNewFile', 'ToolbarNewFolder', 'ToolbarRename', 'ToolbarUpload', 'ToolbarDownload', 'ToolbarZip', 'ToolbarAbout', 'ToolbarSettings', 'ToolbarSaveAsXml', 'ToolbarPrintStructure', 'ToolbarFileSystem');
var useTransitions = true;
and this is the divs i want to replace with each other
<div id="ActionsPanel">
<div>
<div id="ToolbarUpload" style="visibility:hidden;top:5px;left:5px;z-index:3;">
blah blah blah
</div><div id="ToolbarDownload" style="visibility:hidden;top:5px;left:5px;z-index:4;">
blah blah blah
</div><div id="ToolbarRename" style="visibility:hidden;top:5px;left:5px;z-index:5;">
blah blah blah
</div>
</div>
</div>
any help please?
regards,
g00fy
|
|
|
|
|
Use display instead of visibility. Making an element invisible doesn't remove it from the page flow, it will still take up space.
---
b { font-weight: normal; }
|
|
|
|
|
thanks guffa,
i knew that but forgot it, just needed a kick in the head to remind me.
g00fy
|
|
|
|
|
g00fyman wrote: just needed a kick in the head to remind me
Glad to be able to kick you.
---
b { font-weight: normal; }
|
|
|
|
|
need to design a server & intercept info in the dll to interact with a database.
is there a way to do that? for instance, where can i trap packets sent by a web user to the server? any modification in the dll required?
how can we get the session id of web client from server end?
|
|
|
|
|
hi
I am using IE Web Controls Tree View,I want to add and Remove the Nodes dynamically through javascript,can any person help me .Please give response in ASAP.
te
|
|
|
|
|
There's no such thing as a Tree View in a web page. Do you mean a Table?
|
|
|
|