Fungus1487 55 Posting Pro in Training

i dont quite understand are you trying to do? dynamically create data in your first column based on what the user presses ?

Fungus1487 55 Posting Pro in Training

1. open your new page window (make sure you save the window to a variable i.e. 'win')

var win = window.open(....);

2. from existing page check the new window youve opened to see if it is finished loading. If it has then call the function if not set timeout to try again

checkwin(){
    if(win.document.readyState == 'complete') {
        win.functionname(variable1, variable2);
    } else {
        settimeout('checkwin()', 1000);
    }
}
checkwin();
Fungus1487 55 Posting Pro in Training

it would be better to set a value for each checkbox instead of getting the innerHTML all the time

Fungus1487 55 Posting Pro in Training

why not use a function like

function getchecked() {
    var newtxt = '';
    var chkbx = document.getElementsByTagName('input');
    for(var i = 0; i < chkbx.length; i ++) {
        if(chkbx[i].type == 'checkbox' && chkbx[i].checked === true) {
            if(newtxt.length !== 0) {
                newtxt += ',';
            }
            newtxt += chkbx.innerHTML;
        }
    }
    document.form.marktext.value = newtxt;
}

run that on your onclick event and bobs your uncle

Fungus1487 55 Posting Pro in Training

1. create a script with an array of image urls
2. use GET ie. www.page.com?img=1 method to post img number to page. on page load change the image based on this number.
3. use meta refresh or javascript to refresh after several seconds incrementing the GET img variable.

and that is how you would do it.
happy coding.

Fungus1487 55 Posting Pro in Training

you could use html frameset this would keep any information you have active without clearing it as you would not need to refresh the page with the tables in.

google html frameset for more info or if you r having trouble let us know.

by the way alot of developers claim frames = bad. they are so only if you treat them badly.

Fungus1487 55 Posting Pro in Training

that is like asking us to perform open heart surgery whilst wearing a blindfold?

can u post some sample code?

Fungus1487 55 Posting Pro in Training
Fungus1487 55 Posting Pro in Training

i stand corrected.

Fungus1487 55 Posting Pro in Training

you could always create an html page with a prompt something ike 'Loading.. Please wait' and upon hiding your iframe change the location to ths page.

then when opening the iframe they will see a lovely message awaiting them.

in my opinion

document.framename.location = 'url';

is faster than accessing its src attribute node but i am unsure and probly would save u 10th's off a second.

Fungus1487 55 Posting Pro in Training

ok then just simply add an onchange event to your FILE input.

<form name="form1"/>
    <input type="file" name="filediag" style="display:none"
            onchange="window.open(this.value, '_blank')" />
    <input type="button" value="browse..." 
            onclick="document.form1.filediag.click()" />
</form>

the above code will open the path of the file in a new browser window.

be aware this is only supported by I.E.6 + mozilla 1.5+ i believe as the onchange event in an INPUT of type file never used to work.

Fungus1487 55 Posting Pro in Training

why not hide/show the iframe instead of creating a new instance each time.

i.e.
on page startup create a hidden iframe
when openframe is called change the visibility and use document.frame.location = '.....' to change the url.

if your using php also depending ont he amout of code the server will have to compile, run and show the results of whatever your doing. You can try using zend or something to precompile the php that may increase performance.

also

makeframe.setAttribute("class", "PopIframe");

is not compatible with all browsers, some use className as i am aware

Fungus1487 55 Posting Pro in Training

set the cookies expiration date to an earlier time than now.

// FUNCTION TO DELETE A COOKIE
function deletecookie(name) {
		var expdate = new Date();
		expdate.setTime(expdate.getTime() - 1);
		document.cookie = name += "=; expires=" + expdate.toGMTString();
}
Fungus1487 55 Posting Pro in Training

you cant hide the textbox but if you set the display style property of the FORM element to 'none' and create another element of type button then using javascript you can open the dialog onClick of the button e.g.

<form name="form1"/>
    <input type="file" name="filediag" style="display:none" />
    <input type="button" value="browse..." 
            onclick="document.form1.filediag.click()" />
</form>
Fungus1487 55 Posting Pro in Training

well in my opinion...

1) promotes messy coding habits
2) oop is lacking
3) error handling is poor

thos are my main qualms.

Fungus1487 55 Posting Pro in Training

there seems to be alot of processing on the server to simly just change these pages why not use CSS css tabs with iframes then just load your aspx page into the iframe on tab change, not only would it be complient across all modern browsers but it would save pointless postbacks.

Fungus1487 55 Posting Pro in Training

i dont know of any third party tabs but when i need tabs i use iframes. with a form for each page you want in each then use javascript to change the page.

Fungus1487 55 Posting Pro in Training

im having trouble using the PUSH method to generate a report .

this is my code.

Try
            cr1.Visible = False
            Dim myConnection As New SqlClient.SqlConnection
            myConnection.ConnectionString = "Data Source=someplace;Initial Catalog=somedb;User Id=someid;Password=somepass;"

            Dim MyCommand As New SqlClient.SqlCommand
            MyCommand.Connection = myConnection
            MyCommand.CommandText = "Select * from asset where assetid < 10"
            MyCommand.CommandType = CommandType.Text

            Dim MyDA As New SqlClient.SqlDataAdapter
            MyDA.SelectCommand = MyCommand

            Dim myDS As New dyn_dataset
            'This is our DataSet created at Design Time      

            MyDA.Fill(myDS, "asset")

            Dim oRpt As New dyn_report2
            ' This is the Crystal Report file created at Design Time

            oRpt.SetDataSource(myDS)

            cr1.ReportSource = oRpt
            ' Set the Crystal Report Viewer's property to the oRpt Report object
            cr1.Visible = True
        Catch e As Exception
            Response.Write("<h3>" & e.Message & "</h3>")
            Response.Write("<h3>" & e.Source & "</h3>")
            Response.Write("<h3>" & e.StackTrace & "</h3>")
        End Try

and this is my error message

////////////////
Load report failed.
CrystalDecisions.CrystalReports.Engine
at .F(String , EngineExceptionErrorID ) at .B(String , Int32 ) at CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String reportName, OpenReportMethod openMethod, Int16 parentJob) at CrystalDecisions.CrystalReports.Engine.ReportClass.Load(String reportName, OpenReportMethod openMethod, Int16 parentJob) at CrystalDecisions.CrystalReports.Engine.ReportDocument.SetDataSource(Object value) at sam_test.dyn_test.BindReport() in c:\inetpub\wwwroot\sam_test\CHANGECONN\dyn_test.aspx.vb:line 51
///////////////////

i know the report is their but i keep getting a load report failed

Fungus1487 55 Posting Pro in Training

your welcome

Fungus1487 55 Posting Pro in Training

Hello, I need to access the database when a session unexpectedly ends or session times out. This is just for telling the database to update a field for when the user last logged in. The reason I need this is that it saves me tons of coding for other stuff so I do not have to use excess database ruitines, excess functions, etc.

Please if you know how to force the server to do an update on session timeouts or unexpected ends, please help.

asp.net 2.0
vb.net or lower
MySQL

goto the 'CODEBEHIND' in your global.asax file located at the root. then there are events in their to handle all these occurances.

i.e. session start / end, application start / end even an event for request if the need for validation is so great.

something like

Sub Session_End(ByVal sender As Object, ByVal e As EventArgs)
    Dim cnn as new ADODB.Connection
    cnn.connectionstring = "YOUR CONNECTION STRING"
    cnn.open
    cnn.execute("your SQL query")
    cnn.close()
    cnn = nothing
End Sub

but why not change this value on login seeing as it is LAST '''LOGIN''' DATE

Fungus1487 55 Posting Pro in Training

breakthrough...


well not quite. i figured i could possibly be going about this the wrong way. After alot of googling i came across alot of java applets that support GIS mapping. and well i know java! so two and two made sense. If anyone has any decent reasons why not to choose this route then im all ears.

Fungus1487 55 Posting Pro in Training

cheers for the reply, ill take a look into that. it doesnt seem the most effecient way but any options given to me at them moment are worth looking into.

anyone else ?

Fungus1487 55 Posting Pro in Training

indeed.
found alot of companies that claim to have done it. but dont actually support a proper cad drawing. it involves converting the CAD drawing. But a cad drawing is made up of vectors which i thought flash would be able to manipulate. i know thats a big presumption to make but it seemed plausible. Obviously there is some runtime conversion invovled as the file is not going to be directly plottable. Seems like im going to have to research into the schematics of a cad drawing file. [how lovely]

if anybody else could shed some light it would be greatly appreciated.

Fungus1487 55 Posting Pro in Training

well. first of i simply require a 2d model for example a plan view. But it would contain one or more layers which could be turned on or off. simply like layering an image. The only manipulation would be similiar to google maps i.e. zoom, drag and place markers. But obviously with a proper CAD drawing and not one converted to an swf or other

Fungus1487 55 Posting Pro in Training

hello all,

this probably isnt even the correct forum to ask but does anybody know whether it is possible to LOAD a CAD drawing into a flash movie and be able to manipulate it ?

Fungus1487 55 Posting Pro in Training

???? without knowing what the program is that uses this i doubt anybody could help you ?

Fungus1487 55 Posting Pro in Training

perhaps ask in the correct forum ?

web developement/databases

as the people that may know your answer may not look here.

Fungus1487 55 Posting Pro in Training

you can set the domain on a cookie as follows

Response.Cookies("CookieName").Domain = "www.mydomain.com"

and even a path of the cookie on that domain to make sure it can only be read by the path on that domain and not another

Response.Cookies("CookieName").Path = "/maindir/subdir/path"
Fungus1487 55 Posting Pro in Training

thanks all for your replies.

i have tested both methods and there is very little load time difference between each case. onclick is generally faster but i find myself having to add the

element.href = 'javascsript:void(0)';

anyway to stop to postback

BUT

after some soul searching found this why not to use href="javascript"

and i qoute

eventually coming across a post on Microsoft’s Web site. It strongly suggested not using javascript:; in the href… ever.

this pretty much summed up what i have got to do. Considering this web app is built for IE only on a local intranet i have tried the method suggested above to append the ONCLICK with return false; and have had no troubles.

dont ask me why IE only, suffice to say the companies i am writing for are local councils and all have stressed they will never use any other browser except IE (which means they will never use a decent browser) but thanks again to all who commented

Fungus1487 55 Posting Pro in Training
document.getElementById('button').disabled = true

if you want to maintain the state when refreshing just use something like a cookie to hold the boolean flag

Fungus1487 55 Posting Pro in Training

using javascript

are you talkin about validating it to check whether it is REAL or whether the format is correct ?

Fungus1487 55 Posting Pro in Training

The same issue occurs with the second approach since you end up calling a function inside the 'href'. A better way would be to use :

<a href="#" onclick="myFunction();">Take me away</a>

i have been using this practice for years but have come across a problem. using '#' will refresh the view of the page (thus if having scrolled miles down a page, resulting in a lovely jerk back to the top)

in the web app i am writing this just cannot happen.

i have 2 frames and
the left frame contains a tree, i fell flat on my face using built in asp.net trees so had to manually create one using dynamic javascript. the tree works perfectly and is at least 10 times faster than the .net version but i cannot use '#' for the very reason above.

is there any other way of stopping the anchor tag posting back ?

i do not wish to add 2 (onmouseover & onmouseout) events just to make it appear like a link.

Fungus1487 55 Posting Pro in Training

you cannot hide these items after the browser has loaded the page. You would have to use a window.open('url', 'windowname', 'height=600,width=800,status=0,toolbar=0,menubar=0,resizable=1,scrollbars=1')

Fungus1487 55 Posting Pro in Training

Hello all.

Which is the best practice to use when creating dynamic links i.e. onclick events.

<a href="javascript:somefunction()">click me</a>

OR

<a href="javascript:void(0)" onclick="somefunction()">click me</a>

i realise the first is not an 'event' but i have a web app which is displaying 6000 of these links all at one time and am unsure which is taking up more of my processor by dynamically creating onclick events or adding the javascript function in the href ?

also could anyone tell me if there are compatibility problems with either method. thanks for your help

Fungus1487 55 Posting Pro in Training

ok then

something like

function changeiframe(iframe) {
  var height = iframe.document.body.offsetHeight;
  var width = iframe.document.body.offsetWidth;
  return [width, height];
}

if you pass that function the iframe in question it should return the width and height

Fungus1487 55 Posting Pro in Training

even if you did put ur code under GPL or copyrighted how would you even keep tabs on the use??? in short.dont give them source code. if its an application. there should be no requirement for a general user to have the source code. its like asking MS to give them the source code when u buy VISTA

Fungus1487 55 Posting Pro in Training

lol i think you misunderstood me

what other languages are there lol that's all i could think of.i really dont want cgi its old and out of date i think.correct me if iam wrong.

the ones you stated will if you look to implement them correctly be ALOT of work just keep that in mind. perhaps start with a basic design and implement just html first. to do it well there will be alot to go into it.

- export code function (remove whitespace)

as a web designer if youve ever used w3c web tool for removing whitespace. it is key as it can reduce file size and speed up pages.
yet ive never seen something similiar implemented into a designer. reformatting is usually there but not remove whitespace.

you dont seem to be getting many responses here so perhaps spread your message around the other boards targeting that specific audience

Fungus1487 55 Posting Pro in Training

iam going to implement html,css,js,jsp,php,cfm,asp,asp.net

so not alot then lmfao.

ermm.

- sensible formatting options i.e. reformat code (to indent correctly)
- export code function (remove whitespace)
- if your gonna check for syntax allow different doc types i.e. html strict/transitional
- maybe implement syntax for mobile only websites?

Fungus1487 55 Posting Pro in Training

no trouble

Fungus1487 55 Posting Pro in Training

Can I place a <h1>, <h2> etc inside a Div?

answer: yes

I understand I cannont place a <p> inside a <h1> or <h2>, is this correct?

answer: correct. it is not valid html4.01

I understand I cannot put a <ul> inside a <h1> or <h2>, is this correct?

answer:correct ^ as above

I had a navigation div which housed an SSI CSS tab menu floated to the left, and a three item vertical list (ul li) floated to the right of the navigation div. I want to know if I can remove the navigation div and just use another <ul><li> as the navigation area? I cant put the SSI or vertical list in say a <h1>

answer: you should be able to use ul to suit your needs.

Finally, I can't place a Div, <ul>, <li> or <h1>etc inside a <p>, is this correct?

answer: correct not valid html

divs are not that bad interms of coding practice. it simply depends whether they are positioned absolutely. as this is a bad coding practice

Fungus1487 55 Posting Pro in Training

what are you looking to implement? Just HTML and CSS. Or other web related languages i.e. javascript, php, even asp and .net?

Fungus1487 55 Posting Pro in Training

im pretty certain when linking to a site outside of your domain there becomes problems with javascript. therefore i dont believe you can get any properties from the page

Fungus1487 55 Posting Pro in Training

i work without contract on the terms that 30% is paid before work begins. further 60% on installation/transfer of said software and 10% following 2 weeks after has been fully implemented into system with no problems. DO NOT GIVE THEM ANY CODE!!! and do not send them the product without the money clearing first. also make sure theyre not asking for support as if they come back biting you in the ass for sumthing that isnt working then ur responsible. if they want support. charge them extra!

Fungus1487 55 Posting Pro in Training

if you want the quick and rough way. add your progress bar to the form (dynamically would be best as you may have more than one row) then adjust its position relative to the listview. if you have added your progress bar to the listview control it will already have a fixed relative position to that of the parent control. only thing left to do then is update the progress loader.

Fungus1487 55 Posting Pro in Training

use the following at the end of your code

BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
in.readLine();

it will pause your command prompt and wait for an input.

Fungus1487 55 Posting Pro in Training

pseudo code is a DESCRIPTION based on an algorythm. It is used so that programmers can see what is happening. It is good as it allows programmers to understand tasks at a glance

i.e.

' VB CODE
Dim str as string = "heya"
Dim str2 as string = "oh no!"

if str = str2 then
    msgbox("they equal each other")
else
    msgbox("they are not equal")
end if

'pseudocode

[B]if[/B] string 1 equals string 2
    show message box stating both are equal
[B]else[/B]
    show message box stating they are not
[B]end if[/B]

the main reason for using it is during analysis and design stages of creating an application so the designer can work out what is required to happen and create a logical order before attempting to code the given code.

Fungus1487 55 Posting Pro in Training

not necessarily. You may want to validate with js or post to another page

Fungus1487 55 Posting Pro in Training

Does the form property ACTION box says <?php echo $loginFormAction; ?>

why would the action attribute have to contain this ?

Fungus1487 55 Posting Pro in Training

document.FormName.myname+x+.value = 'Test';

replace with

if (document.getElementById('myname' + x)) {
   document.getElementById('myname' + x).value = 'Test';
}

HMM WHY DID I NOT SEE EVERYONES POSTS 2 MINS AGO ?
DANIWEB THREW A BRAIN FART OR I AM A LEPER

Fungus1487 55 Posting Pro in Training

no.
declaration must be first.