Fungus1487 55 Posting Pro in Training

Basically i have a wizard so a user can setup the web app correctly when installed.

This requires them to enter details on a server which houses their database.

I would like to return a list of current paths in the local network for ease which they could select etc and also be able to enter manually if they have an alternative setup.

I just want to return all server paths which the current computer has found on its local area network. can this be done? I figured it would be under My.Network..... but to no avail. Please give me a hand if you have managed to achieve this before.

Fungus1487 55 Posting Pro in Training

cheers daedal for the help. Hope more people can comment.

Fungus1487 55 Posting Pro in Training

great glad this worked for you. Feel free to give me some rep :D

Fungus1487 55 Posting Pro in Training
echo $query;
Fungus1487 55 Posting Pro in Training

if u get stuck just post up some of ur code where you are creating your SQL statement and ill have a look for you. hope it goes well.

Fungus1487 55 Posting Pro in Training

<center> element is depreciated in html and not supported in xhtml but it would not cause IE to not render an image.

try changing your image names to a.jpg and b.jpg to see if it can find them then

the only other thing could be have you converted your images correctly. I had a dodgy batch of Jpegs from a client once which would not show in a browser.

if this is still causing a problem after try opening the image in your favourite editor (ms paint if you have to) then do a "file" >> "save as" and make sure "jpg" is selected in the dropdown.

Fungus1487 55 Posting Pro in Training

this is where you should use a normalised database with seperate tables for category, city and type etc.

but to get round redesigning ur DB. when u create ur statement check to see if the "cityName" and "type" variable length is greater than 0 and print a statement accordingly.

example:

if(isset($_GET["category"]) && isset($_GET["cityName"]) && isset($_GET["typeProp"])) {
    $cat = $_GET["category"];
    $city = $_GET["cityName"];
    $typ = $_GET["typeProp"];
    $sql = "SELECT * FROM item WHERE category = $cat ";
    if(strlen($city) > 0) {
        $sql .= " AND city = $city ";
        if(strlen($typ) > 0) {
            $sql .= " AND type = $typ ";
        }
    }
    $sql .= " ORDER BY price";
    // Perform query and fetch results
}
Fungus1487 55 Posting Pro in Training

echo the $query variable before it is fired to see exactly what the query is at runtime.

Fungus1487 55 Posting Pro in Training

i see what you mean.

thanks its now on my list!

Fungus1487 55 Posting Pro in Training

so are we talking back end as in direct editing of the sites scripting language such as asp.net or such as you mention functions? or are we simply talking allowing permissions for specific editing of specific areas e.g. user 1 can edit news but user 2 cannot?

Thanks again for giving your ideas its really appreciated.

Fungus1487 55 Posting Pro in Training

i have tried this before (quite a while back) yet i found no solution i fear there isnt one for IE 6 there may be for 7 tho as it seems more compliant.

Fungus1487 55 Posting Pro in Training

Ok short of re-inventing the wheel here i wanna know if there are any features you would like to see implemented in a CMS that perhaps you havent seen elsewhere. I have a final year project to undertake and aswell as this being useful for myself and my own clients i thought maybe there are developers out there who could benefit aswell. I was looking into something along the lines of cushy CMS if anyone has seen it. It appears to be a non destructive CMS using css classes to define areas of content editable to a given user. But asides from this are there any features no matter how estranged :D that anybody could find useful?

Thanks for anybody taking the time to give some feedback.

Fungus1487 55 Posting Pro in Training

is the function in the <head></head> area of the html document. the online example i put up works fine in both IE and firefox and the code has just been dragged from that.

Fungus1487 55 Posting Pro in Training

yes that may just work. but the increased time in doing this loop may take just as long as your original solution.

Fungus1487 55 Posting Pro in Training

i chopped up your code and used it with some big pics of my band.

here is the result resize example

my connection is fast but it seems to be resizing the image after it is loaded then moving on. But you would have to add an

onload="resizeImage(this)"

to every image tag you want resizing compared to your looping method. Personally i think the iterative loop at the end is a much better approach but this way works too.

var maxwidth = 100;
var maxheight = 100;
function resizeImage(img) {
	if(img.getAttribute("alt")=="user posted image") {
		w=parseInt(img.width);
		h=parseInt(img.height);
		if (parseInt(img.width)>maxwidth) {
			img.style.cursor="pointer";
			img.setAttribute('title','Reduced Image - Click to see full size');
			img.onclick=new
			Function('onclick=jkpopimage(this.src,600,500);');
			img.height=(maxwidth/img.width)*img.height;
			img.width=maxwidth;
		}
		if (parseInt(img.height)>maxheight) {
			img.style.cursor="pointer";
			img.onclick=new
			Function('onclick=jkpopimage(this.src,600,500);');
			img.width=(maxheight/img.height)*img.width;
			img.height=maxheight;
		}
	}
}
<p><img src="img.jpg" alt="user posted image" onload="resizeImage(this)" /></p>
Fungus1487 55 Posting Pro in Training

your welcome feel free to give me some rep :D and mark the post as solved

Fungus1487 55 Posting Pro in Training

why not use the "defer" attribute of the script tag?

<script type='text/javascript' [B]defer='defer'[/B]>

you could also add an onLoad event handler to run the script once the browser has loaded all information. But defer should work fine for what your after.

Fungus1487 55 Posting Pro in Training

Do you have this data in date variables or as strings ?

ill presume its a string if it isnt skip the first part.

Dim totalTime As New TimeSpan(0, 0, 0) ' Declare a timespan outside the loop to hold the count

For Each Record ' Create your loop to iteratively work through the returned results

    Dim arrStr As String() = yourVariable.split(cchar(":")) ' Break apart your string if you already have it in DateTime object then simply change the method below to use the "Hours", "Minutes" and "Seconds" property of the object
    Dim timTmp As TimeSpan = new TimeSpan(cint(arrStr(0)), _
            cint(arrStr(1)), cint(arrStr(2)))
    totalTime = totalTime.Add(timTmp)

Next

MsgBox(totalTime.Days & " days, " & totalTime.Hours & " hours, " & _
        totalTime.Minutes & " minutes and " & totalTime.Seconds & " seconds")
Fungus1487 55 Posting Pro in Training
<p class="MsoNormal">
<span style="font-size: 10.0pt; font-family: Verdana">
Florida PROMiSE partners and staff can use the following site to share and exchange information regarding to the project.&nbsp; &nbsp;</span></p>
<p class="MsoNormal" align="left">
<font size="2"><span style="font-family: Verdana">
<a [B]target="_blank"[/B] href="http://coursesites.blackboard.com/webapps/portal/frameset.jsp">
Florida PROMiSE Secured Project Site</a></span></font></p>
Fungus1487 55 Posting Pro in Training

Are you able to forward some links to me of these 3rd party products - I can then forward them on to my boss

Thanks in advance

well a quick google search for "intranet timetable software" comes up with a few.
Sorry i think i phrased my last entry wrong "There are some 3rd party" i mean that there is more than likely 3rd party apps.
I have never actually used anything as i feel comfortable buidling my own, but im certain these would fullfill what your looking for but may be too complex to customise to have a simple interface.

This is one of them cases where it may require a developer to implement a system catered for you which you or another then could update/tweak and edit.

If you head about doing this your self then the two bullet points you listed

* Visitors expected at school today (including their picture)
* List of senior management team on site today

shouldnt be difficult to implement and is probably easiest to start with.
But you will then need a back end for staff to edit these details.

Perhaps its best for you to attempt a mock up system for one of these elements and see how far you get. The learning curve is huge but if you break it down you should be able to achieve everything you require. And everyone on daniweb would be happy to help with problems …

Fungus1487 55 Posting Pro in Training

then you would search using the following in that circumstance.

SELECT * FROM S WHERE s1 LIKE '%what you want to search for%'

The % sign either side of the search text indicates two wildcards and will search for the string inside other strings.

E.G.

table 'user' has rows...

id | name
1  | 'john'
2  | 'alan'
3  | 'joe'

when firing this SQL statement

SELECT id FROM user WHERE name LIKE '%jo%'

it will return rows with ID's 1& 3

because john and joe contains the phrase 'jo'

if you wanted to do this through all your tables and they have a similiar format.

then you could use a php array to hold the table name, ID and search field and loop through generating the sql statement dynamically.

Fungus1487 55 Posting Pro in Training

you can use expressions but these are only picked up by internet explorer and are invalid css markup.

.className
{
     width:expression(window.innerWidth ? window.innerWidth + "px" : 
        (document.body.offsetWidth ? document.body.offsetWidth + "px" : 
            "100%"));
}
peter_budo commented: Nice example +8
Fungus1487 55 Posting Pro in Training

cant be done.

Fungus1487 55 Posting Pro in Training

Do you have any experience implementing php/asp.net scripts ? As this could prove difficult if your not too sure what you are doing. There are some 3rd party tools out there which will probably do all this for you but your gonna have to pay for these as i dont know of any free ones.

Fungus1487 55 Posting Pro in Training

Why do you need the excel document if you are simply adding all this data to the database?

Do all your calculations in your code behind. it will be faster.

Fungus1487 55 Posting Pro in Training

SELECT * FROM tablename WHERE somefield LIKE '%searchquery%'

other than taking the time to write an iterative script you will need to write individual SQL statements for each table.

Fungus1487 55 Posting Pro in Training

well i am almost certain you cant use relative positioning with the technique you are using but i have frequently used the opening div as a placeholder for inner relative elements.

E.g if you move your css into an outer div and wrap what you already have. (without moving the position:relative information) you get.

<div style="float:right;width:20%;">
	<div style="position:relative;background-color:blue;left:0px;top:5px;z-index:4;">
	  <p class="yrs">yyyy - yyyy</p>
	</div>
</div>
<div style="width: auto;margin-right:20%;">
	<div style="position:relative;background-color:blue;left:0px;top:0px;z-index: 4">
	  <p class="c5">Company</p>
	  <p class="c4">Job Title</p>
	  <p class="c4">Description. (This can be quite long and is a key factor for making the height automatic since</p>
	</div>
</div>

im still not 100% sure what your after. Hopefully that helps.

Fungus1487 55 Posting Pro in Training

The method you are using is depreciated and you should create your controls dynamically using the built in methods.

E.g.

HtmlInputCheckBox cb = new HtmlInputCheckBox();
cb.id = "someid";
cb.value = "your value";

/* Panel1 being a panel or some sort of placeholder on the page */
panel1.Controls.Add(cb);

When creating dynamic controls to access there variables on post back you need to re-initialise them.

Essentially recreating them (it sounds stupid)

Here is an example for you.

I see your using C# and im afraid that this is in VB.net from an old project. But its not very difficult to convert.

Just Create a new Website add this as a page and run it. (Again make sure its vb.net)

<%@ Page Language="VB" Strict="true" %>

<script runat="server">
    
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
        Dim enuView As IEnumerator = ViewState.Keys.GetEnumerator
        While enuView.MoveNext
            Dim strKey As String = enuView.Current.ToString
            If strKey.StartsWith("txt~", StringComparison.OrdinalIgnoreCase) Then
                createTextBox(strKey, True)
            ElseIf strKey.StartsWith("ddl~", StringComparison.OrdinalIgnoreCase) Then
                createDropDownList(strKey, True)
            End If
        End While
    End Sub

    Protected Sub btnAddTextBox_Click(ByVal sender As Object, ByVal e As System.EventArgs)
        Dim strId As String = "txt~" & Format(Now, "HHmmss")
        createTextBox(strId, False)
    End Sub
    
    Protected Sub btnAddDropDownList_Click(ByVal sender As Object, ByVal e As System.EventArgs)
        Dim strId As String = "ddl~" & Format(Now, "HHmmss")
        createDropDownList(strId, False)
    End Sub
    
    Private Sub createTextBox(ByVal strId As String, ByVal isReturning As Boolean)
        Dim txtBox As New TextBox
        
        txtBox.ID = strId ' Set ID before if returning
        plcDynamicContent.Controls.Add(txtBox) ' Add to page …
majestic0110 commented: Good answer +2
Fungus1487 55 Posting Pro in Training

are you displaying tabular information ?

it very much looks like it.

one thing is tables are NOT bad. But are simply bad when using them for entirely different purposes than they were created for.

If you have tabular data use tables.

dwlamb_001 commented: Helpful. Informative. A gent of the first order +1
Fungus1487 55 Posting Pro in Training

Please read what should i choose?


To all IT Professionals help me choose a 2nd career path please!!
Professionals that work in the field there opinion,if they were gonna
get into this field all over again what path would they choose?Here's
my situation I am 31 yrs old, already have a decent job,Am unsure
about the future with the Auto Industry,works good paying,but boring a
monkey could do It (lol) no but in all seriousness...my schooling for
2 years is being paid for so why not take advantage of it?Here are my
2 options I'm pondering over option 1 Web Information Technology AAS
graduates of this program are prepared for a career in web site
programming and support 2 paths option A prepares students to be a Web
Programmer,Web Programmer Assistant,Web Server Systems
Administrators,or Internet/Intranet Systems Administrator.Path B Also
prepares for Lan/Wan administrator.(graduates of this program also
work as Web Programmers,Web Programmer Assistants,Web Server Systems
administrators,Web Designers,or Web Media developers...That was my
first option here is my second option for career path (Data Assurance
and IT Security)Graduates of this program are prepared for a career in
Computer Network and Internet Security.certificates in Cisco
Networking youd get throgh this or Microsoft/Novell..They also have
the option later to get certified for Cisco Advanced Networking,(16
credits) I'd do at a later date.If anyone can tell me a little more
about …

Fungus1487 55 Posting Pro in Training

I'm a PHP newbie, I need to assign query results to variables that have an incrementing number in the variable name, can someone help me with this?

So let say I return a few rows of from MySQL, I would like loop though the results and assign the values to variables with incrementing numbers like the following:

while($row1 = mysql_fetch_assoc($result1)) {
$sku_1 = row1["sku"];
$quantity_1 = row1["quantity"];
};

where 1 is the incrementing

I eventually need to put these results into a URL like this
&sku_1=1234&quantity_1=1
&sku_2=1235&quantity_2=1
&sku_3=1236&quantity_3=2

Thanks,

Marc

the way to declare vars with dynamic names is as follows.

$var1 = "hel";
$var2 = "lo";
$hello = "yo  there";

echo ${$var1.$var2};

output = "yo there";
Fungus1487 55 Posting Pro in Training

because you are dynamically creating buttons they are not retaining state on postback and therefore wont fire the event assigned to them. You need to re-instantiate each dynamic control individually. E.g. when creating each control assign it an ID and save this to the viewstate. Then on page load loop through viewstate to find you controls and rebuild them. Some good examples are here

or you could use the "ItemCommand" event of the datagrid. This will fire if you set a commandname to your buttons when you create them and you wont need to retain state as above (Which can be messy if not implemented properly).

Fungus1487 55 Posting Pro in Training

I have created new site, and favicon doesn't work on IE6 neither me. It's poor browser. :)

the file is not an icon i have downloaded it and checked it.

use a converter such as http://www.favicon.co.uk/ to convert an image file such as a gif into an icon this will then work.

Fungus1487 55 Posting Pro in Training

ive never used contribute or cushy cms but they look ideal approaches for small sites requiring simple content to be updated. Im intrigued and may look into it.

Fungus1487 55 Posting Pro in Training

use a server side language to perform the xml creation i.e. php or asp.net.

Fungus1487 55 Posting Pro in Training

i dont think your ICO is a proper icon how did you create/convert it?

Fungus1487 55 Posting Pro in Training

Dear Bharathi Krishna..

I am a beginner to this forum as well as creating web pages... I am basically a geologist, but interested in developing web pages... could you please help me out from the scarch to design a member login page.. which verifies the username and password from the data base..

1. how to create a data base so as it register all the new member and their password without manual intervention..

2. how to create a login form... etc..

regards
kalidoss

do you have access to a database on your server?
do you have access to a web server which provides asp.net services?

you need to know this before continuing.

Fungus1487 55 Posting Pro in Training

if you used a server side language such as php/asp.net you could generate content based on say what a client has stored in a database.

this is how most heavy client edited sites work that i have worked on due to them not having to have any experience with the actual code behind.

Fungus1487 55 Posting Pro in Training

aspose are usually the best ones i see on the net for any third part tool.

just contact them. tell them what you require and they can say yes or no to whether the solution they offer will fill in all the parts you need.

Fungus1487 55 Posting Pro in Training

thats correct you need to get the whole querystring aswell if you want to retain the querystring variable. E.G.

action="<? echo $_SERVER["REQUEST_URI"]; ?>"
Fungus1487 55 Posting Pro in Training

This is a case of using a safe (ish) third party tool (which after having looked havent found any decent free ones) or being very careful over how you implement it.

Seeing as you did not want to use a 3rd party tool anyway.

ask yourself how often is this feature required and just how much processing is going into. obviously the more processing the higher the risk of it falling over.

for the level of manipulation you want i doubt there is any other way (bar the 3rd party tool route). personally i have only ever manipulated outlook in this way and the results have been fine for me, this was on a clients server with roughly 10 - 20 users at any one time.

and i also missed a vital part out of that code snippet above

System.Runtime.InteropServices.Marshal.ReleaseComObject(wordDoc)
    System.Runtime.InteropServices.Marshal.ReleaseComObject(wordApp)

to free up the com object after use.

As with the open XML approach i may be wrong but i believe office 2007 is a must have for this work e.g. the client will require office 2007 on there machine or the free office 2007 reader to open a document. This may not be a problem in the future but i dont know any of my clients that are currently using the office 2007 suite.

Tools for actually writing open xml aare the simple system.xml classes. This is the reasoning behind openxml so that developers anywhere can maniupluate these standardised documents. I cant …

Fungus1487 55 Posting Pro in Training

Hey Hey.

i managed to get this working. It just simply changes the text inside a bookmark in a word document.

<%@ Page Language="VB" Strict="true" %>
<%@ Import namespace="Microsoft.Office.Interop.Word" %>
<%
    Dim strValue As String = Request.QueryString("value") ' dynamic value to change bookmark text
    
    Response.Clear()
    Response.ContentType = "application/msword" ' Add word header
    
    Dim wordApp As New Microsoft.Office.Interop.Word.Application
    Dim wordDoc As Microsoft.Office.Interop.Word.Document = wordApp.Documents.Add(Server.MapPath("yourname.doc")) ' Load my template word document
    Dim strFTmp As Object = System.IO.Path.GetTempFileName ' Get a temporary filename as cannot stream directly to response.output
    
    wordDoc.Bookmarks.Item("yourName").Range.Text = strValue ' Change bookmark value
    wordDoc.SaveAs(strFTmp) ' Save to temp file
    wordDoc.Close()
    wordDoc = Nothing
    wordApp.Quit(False)
    wordApp = Nothing
    
    Response.WriteFile(CStr(strFTmp)) ' Write file to response stream
    %>

this seemed to work for me. i had some hassle giving the "ASPNET" user account permission to launch the COM object but once you get around that it looks easy enough.

Fungus1487 55 Posting Pro in Training
<?
if(isset($_POST["yourname"])) {
  // Process database save
}
?>

<html>
    <body>
        <form action="<? echo $_SERVER['php_self']; ?>" method="post">
            <input type="text" name="yourname" />
            <input type="submit" value="enter data" />
        </form>
    </body>
</html>
Fungus1487 55 Posting Pro in Training

i have just looked into this a bit more and have found out you can use the com librarys to manipulate your powerpoint presentation.

i found this word example but havent tried it good luck http://www.codeproject.com/KB/aspnet/wordapplication.aspx

Fungus1487 55 Posting Pro in Training

i dont see any other way of doing this then than the original open XML approach. Be warned to do something like this will take 100's - 1000's of lines of XML

Fungus1487 55 Posting Pro in Training

??? sorry i dont quite understand what your asking ??

Fungus1487 55 Posting Pro in Training

you need to do this on the client with javascript

window.print();

although this will not work in any other browser except internet explorer.

Fungus1487 55 Posting Pro in Training

contact the bank/payment site you wish to use as they all have there own tools for doing this and all are different. They usually have a development sample aswell to get you up and running.

Fungus1487 55 Posting Pro in Training

couldnt you use VBA in the ppt itself. You can use tcp/ip connections thru VBA. it may be along winded approach but without using a third party tool you may be solving this nightmare for a very long time.

Fungus1487 55 Posting Pro in Training

why do you need to use ajax ?
you can do a simple postback which is alot easier.

if ajax is amust you must have some knowledge of javascript aswell.